summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qmenu_symbian.cpp
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-03-11 09:15:55 (GMT)
committeraxis <qt-info@nokia.com>2010-03-11 09:42:47 (GMT)
commita375537d32bc33ba1154ec132f99f5a779bce067 (patch)
tree3c23e3b2c44fb52d7d62036fe7dd793e589841e8 /src/gui/widgets/qmenu_symbian.cpp
parent02f6da62a42bd1059eb0da091d1f46efbb919750 (diff)
parent1e9552f826c05bf9884fb2893dedca265ead363b (diff)
downloadQt-a375537d32bc33ba1154ec132f99f5a779bce067.zip
Qt-a375537d32bc33ba1154ec132f99f5a779bce067.tar.gz
Qt-a375537d32bc33ba1154ec132f99f5a779bce067.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public
Conflicts: mkspecs/common/symbian/symbian.conf qmake/generators/makefile.h qmake/project.cpp src/3rdparty/webkit/WebCore/WebCore.pro src/src.pro
Diffstat (limited to 'src/gui/widgets/qmenu_symbian.cpp')
-rw-r--r--src/gui/widgets/qmenu_symbian.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/widgets/qmenu_symbian.cpp b/src/gui/widgets/qmenu_symbian.cpp
index c064791..e3c52bf 100644
--- a/src/gui/widgets/qmenu_symbian.cpp
+++ b/src/gui/widgets/qmenu_symbian.cpp
@@ -256,6 +256,14 @@ void qt_symbian_show_submenu( CEikMenuPane* menuPane, int id)
{
SymbianMenuItem* menu = qt_symbian_find_menu(id, symbianMenus);
if (menu) {
+ // Normally first AddMenuItemL call for menuPane will create the item array.
+ // However if we don't have any items, we still need the item array. Otherwise
+ // menupane will crash. That's why we create item array here manually, and
+ // AddMenuItemL will then use the existing array.
+ CEikMenuPane::CItemArray* itemArray = q_check_ptr(new CEikMenuPane::CItemArray);
+ menuPane->SetItemArray(itemArray);
+ menuPane->SetItemArrayOwnedExternally(EFalse);
+
for (int i = 0; i < menu->children.count(); ++i)
QT_TRAP_THROWING(menuPane->AddMenuItemL(menu->children.at(i)->menuItemData));
}