--- a/messagingapp/msgui/msgapp/src/msgapplication.cpp Tue Oct 05 13:58:47 2010 +0530
+++ b/messagingapp/msgui/msgapp/src/msgapplication.cpp Tue Oct 19 11:30:16 2010 +0530
@@ -18,6 +18,8 @@
//include
#include <hbmainwindow.h>
#include <hbinstance.h>
+#include <EIKENV.H>
+#include <QSymbianEvent>
//userinclude
#include "msgapplication.h"
@@ -47,3 +49,21 @@
HbMainWindow *window = hbInstance->allMainWindows().first();
disconnect(window, SIGNAL(viewReady()),this,SLOT(handleAppReady()));
}
+
+/*
+ * Overloaded method
+ * handles S60 events
+ */
+bool MsgApplication::symbianEventFilter(const QSymbianEvent *event)
+{
+ QSymbianEvent::Type eventType = event->type();
+
+ // handle close event
+ if (eventType == QSymbianEvent::CommandEvent &&
+ event->command() == EEikCmdExit) {
+ emit closeEvent();
+ return true;
+ }
+ return false;
+}
+