summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_s60.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qapplication_s60.cpp')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index dd51fcd..db67fd8 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -28,6 +28,9 @@
#include "private/qwindowsurface_s60_p.h"
#include "qpaintengine.h"
#include "qmenubar.h"
+#include "qmainwindow.h"
+#include "qsoftkeystack.h"
+#include "private/qsoftkeystack_p.h"
#include "apgwgnam.h" // For CApaWindowGroupName
#include <MdaAudioTonePlayer.h> // For CMdaAudioToneUtility
@@ -1024,13 +1027,18 @@ void QApplication::s60HandleCommandL(int command)
{
switch (command) {
case EEikCmdExit:
- case EAknSoftkeyBack:
case EAknSoftkeyExit:
- qApp->exit();
+ exit();
break;
default:
- // For now assume all unknown menu items are Qt menu items
- QMenuBar::symbianCommands(command);
+ if (command >= SOFTKEYSTART && command <= SOFTKEYEND) {
+ const QMainWindow *activeMainWindow =
+ qobject_cast<const QMainWindow*>(QApplication::activeWindow());
+ if (activeMainWindow)
+ activeMainWindow->softKeyStack()->handleSoftKeyPress(command);
+ } else {
+ QMenuBar::symbianCommands(command);
+ }
break;
}
}