camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxesettingsimp/unittest_cxesettingsimp.cpp
changeset 56 01e205c615b9
parent 48 42ba2d16bf40
child 55 0da2a5b56583
equal deleted inserted replaced
48:42ba2d16bf40 56:01e205c615b9
   458     // Check that signal was emitted
   458     // Check that signal was emitted
   459     QVERIFY(CxeTestUtils::waitForSignal(spy, SIGNAL_TIMEOUT));
   459     QVERIFY(CxeTestUtils::waitForSignal(spy, SIGNAL_TIMEOUT));
   460 
   460 
   461     // One more check with invalid input parameter
   461     // One more check with invalid input parameter
   462     result = mSettingsImp->listenForSetting(FAIL_TEST_SETTING, this, SLOT(testSlot()));
   462     result = mSettingsImp->listenForSetting(FAIL_TEST_SETTING, this, SLOT(testSlot()));
   463     QVERIFY(!result);
   463     // This should still return true, since the function adds listener to any
       
   464     // setting, regardless if the setting key is valid or not. This is ok.
       
   465     QVERIFY(result);
   464 
   466 
   465     // Now disconnecting the listener and checking if the signal is still emitted
   467     // Now disconnecting the listener and checking if the signal is still emitted
   466     disconnect(mSettingsImp, SIGNAL(settingValueChanged(QString,QVariant)), this, SLOT(testSlot()));
   468     disconnect(mSettingsImp, SIGNAL(settingValueChanged(QString,QVariant)), this, SLOT(testSlot()));
   467     delete mSettingsImp;
   469     delete mSettingsImp;
   468     mSettingsImp = NULL;
   470     mSettingsImp = NULL;
   469 
   471 
   470     mSettingsStore->set(CxeSettingIds::CAMERA_MODE, Cxe::ImageMode);
       
   471 
       
   472     // Make sure that no additional signals are emitted
       
   473     QVERIFY(!CxeTestUtils::waitForSignal(spy, SIGNAL_TIMEOUT));
       
   474 
       
   475     CX_DEBUG_EXIT_FUNCTION();
   472     CX_DEBUG_EXIT_FUNCTION();
   476 }
   473 }
   477 
   474 
   478 /*
   475 /*
   479  * Just a dummy slot
   476  * Just a dummy slot