aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@canonical.com>2012-11-22 08:05:13 -0300
committerRenato Araujo Oliveira Filho <renato.filho@canonical.com>2012-11-22 08:05:13 -0300
commitf221fee6746e87e737de6f7a42334d9c8f8355a3 (patch)
tree9d4bf8b9e317fcd4db87b90a0a369ab820b18c9c
parentaf61347893098e0fe2e736606c07337adb6ae18f (diff)
downloadqmenumodel-f221fee6746e87e737de6f7a42334d9c8f8355a3.tar.gz
qmenumodel-f221fee6746e87e737de6f7a42334d9c8f8355a3.tar.bz2
qmenumodel-f221fee6746e87e737de6f7a42334d9c8f8355a3.zip
Moved model children clear to clearModel function.
-rw-r--r--libqmenumodel/src/qmenumodel.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/libqmenumodel/src/qmenumodel.cpp b/libqmenumodel/src/qmenumodel.cpp
index b90cbf2..1e8238b 100644
--- a/libqmenumodel/src/qmenumodel.cpp
+++ b/libqmenumodel/src/qmenumodel.cpp
@@ -72,11 +72,6 @@ void QMenuModel::setMenuModel(GMenuModel *other)
this);
}
- QList<QMenuModel*> list = findChildren<QMenuModel*>();
- Q_FOREACH(QMenuModel *model, list) {
- delete model;
- }
-
endResetModel();
}
@@ -95,6 +90,11 @@ void QMenuModel::clearModel()
g_object_unref(m_menuModel);
m_menuModel = NULL;
}
+
+ QList<QMenuModel*> list = findChildren<QMenuModel*>();
+ Q_FOREACH(QMenuModel *model, list) {
+ delete model;
+ }
}
/*! \internal */