diff -r ecf6a73a9186 -r 60a8a215b0ec messagingapp/msgui/msgapp/src/msgapplication.cpp --- 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 #include +#include +#include //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; +} +