diff options
author | Sami Merilä <sami.merila@nokia.com> | 2009-09-22 08:25:26 (GMT) |
---|---|---|
committer | Sami Merilä <sami.merila@nokia.com> | 2009-09-22 08:25:26 (GMT) |
commit | c0f1055fe809e6f4c90ea7ba3c369b2c01aaae07 (patch) | |
tree | 5271177e653b70d7cfe6e5cad9d26ff884712785 /src/gui/kernel | |
parent | f5ea4ff7ce22f2f16f14b134908aa53c48633584 (diff) | |
download | Qt-c0f1055fe809e6f4c90ea7ba3c369b2c01aaae07.zip Qt-c0f1055fe809e6f4c90ea7ba3c369b2c01aaae07.tar.gz Qt-c0f1055fe809e6f4c90ea7ba3c369b2c01aaae07.tar.bz2 |
Remove key accelerators from Softkeys and Menus in S60.
In S60 softkeys and menu items do not support key accelerators (i.e.
CTRL+X). Therefore, removing the accelerator characters from both softkey
and menu item texts.
Related to task QT-1505 "Make Qt dialogs look native"
Reviewed by Jason Barron
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qsoftkeymanager.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/kernel/qsoftkeymanager.cpp b/src/gui/kernel/qsoftkeymanager.cpp index afb7698..45ecb5a 100644 --- a/src/gui/kernel/qsoftkeymanager.cpp +++ b/src/gui/kernel/qsoftkeymanager.cpp @@ -42,6 +42,7 @@ #include "qapplication.h" #include "qevent.h" #ifdef Q_WS_S60 +#include "qstyle.h" #include "private/qt_s60_p.h" #endif #include "private/qsoftkeymanager_p.h" @@ -197,7 +198,6 @@ bool QSoftKeyManager::event(QEvent *e) #ifdef Q_WS_S60 void QSoftKeyManagerPrivate::updateSoftKeys_sys(const QList<QAction*> &softkeys) { - CEikButtonGroupContainer* nativeContainer = S60->buttonGroupContainer(); QT_TRAP_THROWING(nativeContainer->SetCommandSetL(R_AVKON_SOFTKEYS_EMPTY_WITH_IDS)); @@ -229,7 +229,9 @@ void QSoftKeyManagerPrivate::updateSoftKeys_sys(const QList<QAction*> &softkeys) : s60CommandStart + index; if (position != -1) { - TPtrC text = qt_QString2TPtrC(softKeyAction->text()); + const int underlineShortCut = QApplication::style()->styleHint(QStyle::SH_UnderlineShortcut); + QString iconText = softKeyAction->iconText(); + TPtrC text = qt_QString2TPtrC( underlineShortCut ? softKeyAction->text() : iconText); QT_TRAP_THROWING(nativeContainer->SetCommandL(position, command, text)); } } |