diff options
author | Markku Luukkainen <markku.luukkainen@digia.com> | 2009-06-06 12:29:00 (GMT) |
---|---|---|
committer | Markku Luukkainen <markku.luukkainen@digia.com> | 2009-06-06 12:29:00 (GMT) |
commit | 4dd8985db4653a3f4f406f4fe7c910ffd02643b3 (patch) | |
tree | fead345bd165a0518dc7379b81169454bae1a84a | |
parent | 449d4b00c6e3d8a277821e5fb5837e3da2e6b920 (diff) | |
download | Qt-4dd8985db4653a3f4f406f4fe7c910ffd02643b3.zip Qt-4dd8985db4653a3f4f406f4fe7c910ffd02643b3.tar.gz Qt-4dd8985db4653a3f4f406f4fe7c910ffd02643b3.tar.bz2 |
Added mapping from native hardware keys to softkeys. This enables
the QActions with softKeyRole to be triggered
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 94e59b3..2c7fc02 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1064,8 +1064,15 @@ void QApplication::symbianHandleCommand(int command) exit(); break; default: - if (command >= SOFTKEYSTART && command <= SOFTKEYEND) - QSoftKeyStackPrivate::handleSoftKeyPress(command); + if (command >= SOFTKEYSTART && command <= SOFTKEYEND) { + int index= command-SOFTKEYSTART; + QWidget* focused = QApplication::focusWidget(); + const QList<QAction*>& softKeys = focused->softKeys(); + if (index>=softKeys.count()) { + // Assert horrible state error + } + softKeys.at(index)->activate(QAction::Trigger); + } else QMenuBarPrivate::symbianCommands(command); break; |