messagingapp/msgservices/msgserviceapp/src/msgservicewindow.cpp
changeset 73 ecf6a73a9186
parent 62 fdbe8253b596
--- a/messagingapp/msgservices/msgserviceapp/src/msgservicewindow.cpp	Fri Sep 17 20:16:33 2010 +0530
+++ b/messagingapp/msgservices/msgserviceapp/src/msgservicewindow.cpp	Tue Oct 05 13:58:47 2010 +0530
@@ -14,7 +14,7 @@
  * Description: Message services manages all messaging Qt highway services. 
  *
  */
-
+#include <hbapplication.h>
 #include "msgservicewindow.h"
 
 #include "msgviewinterface.h"
@@ -56,6 +56,10 @@
     mViewInterface = new MsgViewInterface(mViewManager);
     mUriInterface = new MsgUriHandlerInterface(mViewManager);
     mShareUiInterface = new MsgShareUiInterface(mViewManager);
+    
+    // connect to aboutToQuit signal to save drafts content
+    QObject::connect(qApp, SIGNAL(aboutToQuit()), 
+                this, SLOT(saveDraftContents()));
     }
 
 // ----------------------------------------------------------------------------
@@ -112,4 +116,13 @@
     }
 
 }
+
+//---------------------------------------------------------------
+// MsgServiceWindow::saveActivity
+// @see header
+//---------------------------------------------------------------
+void MsgServiceWindow::saveDraftContents()
+{
+    mViewManager->saveContentToDraft();
+}
 // EOF