summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-09-20 18:03:31 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-09-21 08:08:00 (GMT)
commit0408e5f70370298de35c45ea68b6551cf6c496fa (patch)
treef2bdda215c8ec0a4415af210239fd115781aee69 /src/gui/widgets
parent5b12c8736b93c288343d5dbecda7af8fdf264b3e (diff)
downloadQt-0408e5f70370298de35c45ea68b6551cf6c496fa.zip
Qt-0408e5f70370298de35c45ea68b6551cf6c496fa.tar.gz
Qt-0408e5f70370298de35c45ea68b6551cf6c496fa.tar.bz2
Get menubars working again with new softkey API.
This is an unfortunate workaround to get the menu bars working again. Previously we used the soft key role to determine what action command we should use for the softkey. Now we only use the role to determine the position (as we should) and ideally the command would be determined by checking if the action has a menu() and then forcing the command to EAknSoftkeyOptions. This would have enabled any softkey with a menu to work, but unfortunately this would require considerable effort in the menu implementation and time is short. So the workaround is to abuse object name to tell the softkey system that this key is special and should get EAknSoftkeyOptions. Reviewed-by: Alessandro Portale
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qmainwindow.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/widgets/qmainwindow.cpp b/src/gui/widgets/qmainwindow.cpp
index 227a179..0947e1b 100644
--- a/src/gui/widgets/qmainwindow.cpp
+++ b/src/gui/widgets/qmainwindow.cpp
@@ -119,6 +119,7 @@ void QMainWindowPrivate::init()
q->setAttribute(Qt::WA_Hover);
#ifdef QT_SOFTKEYS_ENABLED
menuBarAction = QSoftKeyManager::createAction(QSoftKeyManager::MenuSoftKey, q);
+ menuBarAction->setObjectName("_q_menuSoftKeyAction");
#endif
}