summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qsoftkeymanager.cpp
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/kernel/qsoftkeymanager.cpp
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/kernel/qsoftkeymanager.cpp')
-rw-r--r--src/gui/kernel/qsoftkeymanager.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/kernel/qsoftkeymanager.cpp b/src/gui/kernel/qsoftkeymanager.cpp
index ed6f4c9..0b5f56a 100644
--- a/src/gui/kernel/qsoftkeymanager.cpp
+++ b/src/gui/kernel/qsoftkeymanager.cpp
@@ -224,7 +224,9 @@ void QSoftKeyManagerPrivate::updateSoftKeys_sys(const QList<QAction*> &softkeys)
break;
}
- command = s60CommandStart + index;
+ command = (softKeyAction->objectName().contains("_q_menuSoftKeyAction"))
+ ? EAknSoftkeyOptions
+ : s60CommandStart + index;
if (position != -1) {
TPtrC text = qt_QString2TPtrC(softKeyAction->text());