aboutsummaryrefslogtreecommitdiff
path: root/libqmenumodel
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@canonical.com>2012-11-21 10:54:29 -0300
committerRenato Araujo Oliveira Filho <renato.filho@canonical.com>2012-11-21 10:54:29 -0300
commitaf61347893098e0fe2e736606c07337adb6ae18f (patch)
treed86e5a0bee8bfdbbc8baad4e625b7fcc6aa7c4d5 /libqmenumodel
parent3dec94a9185927d702ae8ca9538f13179b05c151 (diff)
downloadqmenumodel-af61347893098e0fe2e736606c07337adb6ae18f.tar.gz
qmenumodel-af61347893098e0fe2e736606c07337adb6ae18f.tar.bz2
qmenumodel-af61347893098e0fe2e736606c07337adb6ae18f.zip
Fixed memory leak after the service disapear.
Diffstat (limited to 'libqmenumodel')
-rw-r--r--libqmenumodel/src/qmenumodel.cpp5
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();
}