homescreenapp/stateplugins/hshomescreenstateplugin/src/hsbackuprestorestate.cpp
changeset 60 30f14686fb04
parent 51 4785f57bf3d4
child 69 87476091b3f5
equal deleted inserted replaced
55:03646e8da489 60:30f14686fb04
    59 {
    59 {
    60     HsBackupRestoreObserver *backupRestoreObserver = 
    60     HsBackupRestoreObserver *backupRestoreObserver = 
    61         HsBackupRestoreObserver::instance();
    61         HsBackupRestoreObserver::instance();
    62     
    62     
    63     connect(backupRestoreObserver, 
    63     connect(backupRestoreObserver, 
    64             SIGNAL(event_backupRestoreComplited()),
    64             SIGNAL(event_backupRestoreCompleted()),
    65             SIGNAL(event_loadScene()));
    65             SIGNAL(event_loadScene()));
    66     
    66     
    67     // Close database
    67     // Close database
    68     mDatabase.reset(HsDatabase::takeInstance());
    68     mDatabase.reset(HsDatabase::takeInstance());
    69     mDatabase->close();        
    69     mDatabase->close();        
    70     
    70     
    71     deleteIdleView();        
    71     deleteIdleView();        
    72 
    72 
    73     // Delete scene
    73     // Delete scene
    74     HsScene *scene = HsScene::instance();    
    74     HsScene::setInstance(0);
    75     delete scene;
    75     
    76 
       
    77     backupRestoreObserver->readyForBUR();
    76     backupRestoreObserver->readyForBUR();
    78 }
    77 }
    79 
    78 
    80 /*!
    79 /*!
    81     Stops listen backup/restore status.
    80     Stops listen backup/restore status.
    97 {
    96 {
    98     // Delete idle view
    97     // Delete idle view
    99     QScopedPointer<HbView> idleView(HsGui::takeIdleView());
    98     QScopedPointer<HbView> idleView(HsGui::takeIdleView());
   100 
    99 
   101     if (idleView){
   100     if (idleView){
       
   101         HbAction *navigationAction(idleView->navigationAction());
   102         idleView->setNavigationAction(0);
   102         idleView->setNavigationAction(0);
       
   103         delete navigationAction;
   103         HsScene::mainWindow()->removeView(idleView.data());
   104         HsScene::mainWindow()->removeView(idleView.data());
   104     }
   105     }
   105 }
   106 }