summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qmenu_p.h
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-10-05 13:56:57 (GMT)
committeraxis <qt-info@nokia.com>2009-10-05 14:32:02 (GMT)
commitc4571223a0ebb2f00a6c29477d0a4a55ae3cd2b5 (patch)
tree666d1aa77474a875dee0e12c86256a36c0ea2db7 /src/gui/widgets/qmenu_p.h
parent4754ebccb9848bff1cb11caab61f58ac2f441b3c (diff)
downloadQt-c4571223a0ebb2f00a6c29477d0a4a55ae3cd2b5.zip
Qt-c4571223a0ebb2f00a6c29477d0a4a55ae3cd2b5.tar.gz
Qt-c4571223a0ebb2f00a6c29477d0a4a55ae3cd2b5.tar.bz2
Fixed a crash in menus on Symbian.
The reason for the crash was the following: When we make menu entries in Qt, we assign each item an arbitrary command ID. This is because Symbian usually puts the items in a resource file and refers to them by ID, but we need to be dynamic. These command IDs are also assigned to cascading menu items (sub menus). When we then get a callback in RestoreMenuL with one of submenu IDs, we used to ask Symbian to construct the menu items for them, but Symbian doesn't know about them. Fixed by avoiding call into S60 code if the ID belongs to Qt. Also put a cap on the number of menu items. It's very unlikely that anyone will reach it, but it's better to have an actual check. Task: QT-646 AutoTest: Manual testing went fine RevBy: mread
Diffstat (limited to 'src/gui/widgets/qmenu_p.h')
-rw-r--r--src/gui/widgets/qmenu_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/widgets/qmenu_p.h b/src/gui/widgets/qmenu_p.h
index ea1ab47..9c4f260 100644
--- a/src/gui/widgets/qmenu_p.h
+++ b/src/gui/widgets/qmenu_p.h
@@ -63,6 +63,8 @@
#ifdef Q_WS_S60
class CEikMenuPane;
+#define QT_SYMBIAN_FIRST_MENU_ITEM 32000
+#define QT_SYMBIAN_LAST_MENU_ITEM 41999 // 10000 items ought to be enough for anybody...
#endif
QT_BEGIN_NAMESPACE