videoplayerapp/videoplayerengine/src/videoplayerengine.cpp
changeset 55 4bfa887905cf
parent 50 21fe8338c6bf
child 58 d2b028fd1f7d
--- a/videoplayerapp/videoplayerengine/src/videoplayerengine.cpp	Fri Aug 06 09:43:48 2010 +0300
+++ b/videoplayerapp/videoplayerengine/src/videoplayerengine.cpp	Mon Aug 23 14:27:29 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: da1mmcf#42 %
+// Version : %version: da1mmcf#43 %
 
 
 #include <QApplication>
@@ -27,7 +27,7 @@
 #include <hbview.h>
 #include <hbapplication.h>
 #include <hbactivitymanager.h>
-#include <hbdevicenotificationdialog.h>
+#include <hbnotificationdialog.h>
 
 #include "videoplayerengine.h"
 #include "videoactivitystate.h"
@@ -323,8 +323,7 @@
         {
             if ( shouldExit() )
             {
-                qApp->quit();
-                XQServiceUtil::toBackground( false );             
+                serviceQuit();
             }
             else if ( shouldActivateCollectionView()  )
             {
@@ -707,7 +706,9 @@
             
     if ( mIsPlayService )  
     { 
-        HbDeviceNotificationDialog* dlg = new HbDeviceNotificationDialog(); 
+        HbNotificationDialog* dlg = new HbNotificationDialog();
+        
+        connect( dlg, SIGNAL( aboutToClose() ), this, SLOT( serviceQuit() ) );
         
         switch ( errorCode )
         {
@@ -739,10 +740,22 @@
         }
         
         dlg->show();                      
-        
-        
-        qApp->quit();
-        XQServiceUtil::toBackground( false );  
+ 
     }
 }
+
+
+// -------------------------------------------------------------------------------------------------
+// serviceQuit()
+// -------------------------------------------------------------------------------------------------
+//
+void VideoPlayerEngine::serviceQuit()
+{                    
+    MPX_DEBUG(_L("VideoPlayerEngine::serviceQuit()"));     
+    
+    qApp->quit();
+    XQServiceUtil::toBackground( false );
+}
+
+
 // End of file