diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qapplication.h | 1 | ||||
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 16 | ||||
-rw-r--r-- | src/s60main/qts60mainappui.cpp | 15 |
3 files changed, 19 insertions, 13 deletions
diff --git a/src/gui/kernel/qapplication.h b/src/gui/kernel/qapplication.h index 64b33bf..ce8792d 100644 --- a/src/gui/kernel/qapplication.h +++ b/src/gui/kernel/qapplication.h @@ -235,6 +235,7 @@ public: #if defined(Q_WS_S60) int s60ProcessEvent(TWsEvent *event); virtual bool s60EventFilter(TWsEvent *aEvent); + void s60HandleCommandL(int command); #endif #if defined(Q_WS_QWS) virtual bool qwsEventFilter(QWSEvent *); diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 06e47a7..ea0c3a6 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -27,6 +27,7 @@ #endif #include "private/qwindowsurface_s60_p.h" #include "qpaintengine.h" +#include "qmenubar.h" #include "apgwgnam.h" // For CApaWindowGroupName #include <MdaAudioTonePlayer.h> // For CMdaAudioToneUtility @@ -1028,6 +1029,21 @@ bool QApplication::s60EventFilter(TWsEvent *aEvent) return false; } +void QApplication::s60HandleCommandL(int command) +{ + switch (command) { + case EEikCmdExit: + case EAknSoftkeyBack: + case EAknSoftkeyExit: + qApp->exit(); + break; + default: + // For now assume all unknown menu items are Qt menu items + QMenuBar::symbianCommands(command); + break; + } +} + #ifndef QT_NO_WHEELEVENT int QApplication::wheelScrollLines() { diff --git a/src/s60main/qts60mainappui.cpp b/src/s60main/qts60mainappui.cpp index 016d49b..dafbe96 100644 --- a/src/s60main/qts60mainappui.cpp +++ b/src/s60main/qts60mainappui.cpp @@ -20,7 +20,6 @@ #include "qts60mainappui.h" #include <QtGui/qapplication.h> #include <QtGui/qmenu.h> -#include <QtGui/qmenubar.h> #include <QtGui/private/qt_s60_p.h> // ============================ MEMBER FUNCTIONS =============================== @@ -73,18 +72,8 @@ CQtS60MainAppUi::~CQtS60MainAppUi() // void CQtS60MainAppUi::HandleCommandL( TInt aCommand ) { - switch (aCommand) { - case EEikCmdExit: - case EAknSoftkeyBack: - case EAknSoftkeyExit: - if (qApp) - qApp->exit(); - break; - default: - // For now assume all unknown menu items are Qt menu items - QMenuBar::symbianCommands(aCommand); - break; - } + if (qApp) + qApp->s60HandleCommandL(aCommand); } void CQtS60MainAppUi::HandleWsEventL(const TWsEvent& aEvent, CCoeControl *control) |