From 4dd8985db4653a3f4f406f4fe7c910ffd02643b3 Mon Sep 17 00:00:00 2001 From: Markku Luukkainen Date: Sat, 6 Jun 2009 14:29:00 +0200 Subject: Added mapping from native hardware keys to softkeys. This enables the QActions with softKeyRole to be triggered --- src/gui/kernel/qapplication_s60.cpp | 11 +++++++++-- 1 file 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& softKeys = focused->softKeys(); + if (index>=softKeys.count()) { + // Assert horrible state error + } + softKeys.at(index)->activate(QAction::Trigger); + } else QMenuBarPrivate::symbianCommands(command); break; -- cgit v0.12