diff options
author | Renato Araujo Oliveira Filho <renato.filho@canonical.com> | 2012-11-21 10:54:29 -0300 |
---|---|---|
committer | Renato Araujo Oliveira Filho <renato.filho@canonical.com> | 2012-11-21 10:54:29 -0300 |
commit | af61347893098e0fe2e736606c07337adb6ae18f (patch) | |
tree | d86e5a0bee8bfdbbc8baad4e625b7fcc6aa7c4d5 /libqmenumodel/src/qmenumodel.cpp | |
parent | 3dec94a9185927d702ae8ca9538f13179b05c151 (diff) | |
download | qmenumodel-af61347893098e0fe2e736606c07337adb6ae18f.tar.gz qmenumodel-af61347893098e0fe2e736606c07337adb6ae18f.tar.bz2 qmenumodel-af61347893098e0fe2e736606c07337adb6ae18f.zip |
Fixed memory leak after the service disapear.
Diffstat (limited to 'libqmenumodel/src/qmenumodel.cpp')
-rw-r--r-- | libqmenumodel/src/qmenumodel.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libqmenumodel/src/qmenumodel.cpp b/libqmenumodel/src/qmenumodel.cpp index c59522d..b90cbf2 100644 --- a/libqmenumodel/src/qmenumodel.cpp +++ b/libqmenumodel/src/qmenumodel.cpp @@ -72,6 +72,11 @@ void QMenuModel::setMenuModel(GMenuModel *other) this); } + QList<QMenuModel*> list = findChildren<QMenuModel*>(); + Q_FOREACH(QMenuModel *model, list) { + delete model; + } + endResetModel(); } |