diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-09-20 17:37:30 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-09-20 17:37:30 (GMT) |
commit | d5f606f111527516bfe038a4045c8ec92f0499f7 (patch) | |
tree | 3c37fcc82f3657c70b55b2228efecced6c3653cf | |
parent | 1c379003d168a3232d36fb0690bbc546ec158a06 (diff) | |
parent | 0cbb1a488c4199ad06b8ab63a9d6bf09fc8a6911 (diff) | |
download | Qt-d5f606f111527516bfe038a4045c8ec92f0499f7.zip Qt-d5f606f111527516bfe038a4045c8ec92f0499f7.tar.gz Qt-d5f606f111527516bfe038a4045c8ec92f0499f7.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public:
Fixed memory leak in Symbian when Options menu was launched.
-rw-r--r-- | src/gui/widgets/qmenu_symbian.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/widgets/qmenu_symbian.cpp b/src/gui/widgets/qmenu_symbian.cpp index ab2bdea..83ba15a 100644 --- a/src/gui/widgets/qmenu_symbian.cpp +++ b/src/gui/widgets/qmenu_symbian.cpp @@ -168,11 +168,11 @@ static void qt_symbian_insert_action(QSymbianMenuAction* action, QList<SymbianMe if (action->action->menu()->actions().size() > 0) { for (int c2= 0; c2 < action->action->menu()->actions().size(); ++c2) { - QSymbianMenuAction *symbianAction2 = new QSymbianMenuAction; + QScopedPointer<QSymbianMenuAction> symbianAction2(new QSymbianMenuAction); symbianAction2->action = action->action->menu()->actions().at(c2); QMenu * menu = symbianAction2->action->menu(); symbianAction2->command = qt_symbian_menu_static_cmd_id++; - qt_symbian_insert_action(symbianAction2, &(menuItem->children)); + qt_symbian_insert_action(symbianAction2.data(), &(menuItem->children)); } } @@ -432,11 +432,11 @@ void QMenuBarPrivate::QSymbianMenuBarPrivate::removeAction(QSymbianMenuAction *a void QMenuBarPrivate::QSymbianMenuBarPrivate::insertNativeMenuItems(const QList<QAction*> &actions) { for (int i = 0; i <actions.size(); ++i) { - QSymbianMenuAction *symbianActionTopLevel = new QSymbianMenuAction; + QScopedPointer<QSymbianMenuAction> symbianActionTopLevel(new QSymbianMenuAction); symbianActionTopLevel->action = actions.at(i); symbianActionTopLevel->parent = 0; symbianActionTopLevel->command = qt_symbian_menu_static_cmd_id++; - qt_symbian_insert_action(symbianActionTopLevel, &symbianMenus); + qt_symbian_insert_action(symbianActionTopLevel.data(), &symbianMenus); } } |