summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorMarkku Luukkainen <markku.luukkainen@digia.com>2009-06-06 12:29:00 (GMT)
committerMarkku Luukkainen <markku.luukkainen@digia.com>2009-06-06 12:29:00 (GMT)
commit4dd8985db4653a3f4f406f4fe7c910ffd02643b3 (patch)
treefead345bd165a0518dc7379b81169454bae1a84a /src/gui/kernel
parent449d4b00c6e3d8a277821e5fb5837e3da2e6b920 (diff)
downloadQt-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
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp11
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;