diff options
-rw-r--r-- | libqmenumodel/src/qmenumodel.cpp | 10 |
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 */ |