homescreenapp/stateplugins/hshomescreenstateplugin/tsrc/t_hshomescreenstateplugin/src/t_hsbackuprestorestate.cpp
changeset 101 ba1b7e218624
parent 90 3ac3aaebaee5
equal deleted inserted replaced
98:e6f74eb7f69f 101:ba1b7e218624
    34 
    34 
    35 void HomeScreenStatePluginTest::testLoadBackupRestoreStateOnEntryExit()
    35 void HomeScreenStatePluginTest::testLoadBackupRestoreStateOnEntryExit()
    36 {
    36 {
    37     HbInstance::instance();
    37     HbInstance::instance();
    38     HbMainWindow mainWindow;
    38     HbMainWindow mainWindow;
    39     mainWindow.show();   
    39    // mainWindow.show();   
    40     QCoreApplication::sendPostedEvents();
       
    41    
    40    
    42     QStateMachine *sm = new QStateMachine;
    41     QStateMachine *sm = new QStateMachine;
    43     HsBackupRestoreState *brs = new HsBackupRestoreState;
    42     HsBackupRestoreState *brs = new HsBackupRestoreState;
    44 
    43 
    45     sm->addState(brs);
    44     sm->addState(brs);
    50     sm->addState(fs);
    49     sm->addState(fs);
    51 
    50 
    52     brs->addTransition(this, SIGNAL(finishStateMachine()), fs);
    51     brs->addTransition(this, SIGNAL(finishStateMachine()), fs);
    53 
    52 
    54     sm->start();   
    53     sm->start();   
    55     QCoreApplication::sendPostedEvents();  
    54     QCoreApplication::sendPostedEvents(sm,0);  
    56     emit finishStateMachine();
    55     emit finishStateMachine();
    57 
    56 
    58     sm->stop();
    57     sm->stop();
    59     // main window deleted -> HsGui must be deleted also
    58     // main window deleted -> HsGui must be deleted also
    60     delete HsGui::takeInstance();
    59     delete HsGui::takeInstance();