diff -r 30540fccecae -r 851e19007849 controlpanel/tsrc/unit/ut_cpapi/src/ut_cpapi.cpp --- a/controlpanel/tsrc/unit/ut_cpapi/src/ut_cpapi.cpp Fri Apr 16 15:15:08 2010 +0300 +++ b/controlpanel/tsrc/unit/ut_cpapi/src/ut_cpapi.cpp Mon May 03 12:46:45 2010 +0300 @@ -25,8 +25,8 @@ #include #include #include +#include #include -#include #include //testing following classes @@ -48,8 +48,10 @@ void TestCpAPI::cleanupTestCase() { - delete mainWindow; - mainWindow = 0; + //delete mainWindow; + //mainWindow = 0; + //if delete mainwindow, test app will be freezing + QCoreApplication::processEvents(); } void TestCpAPI::testCpBaseSettingView() { @@ -127,7 +129,7 @@ phelper->addConnection( general, "hello",form,"hello"); phelper->removeConnection(general,"hello",form, "hello"); phelper->bindToForm(form); - HbSettingFormItem *pitem = new HbSettingFormItem(); + HbDataFormViewItem *pitem = new HbDataFormViewItem(); phelper->addItemPrototype(pitem); delete phelper; } @@ -137,7 +139,7 @@ QList oldList = form->itemPrototypes(); CpPluginUtility::addCpItemPrototype(form); QList newList = form->itemPrototypes(); - QVERIFY( oldList.count() == newList.count()-1 ); + QVERIFY( oldList.count() < newList.count() ); } void TestCpAPI::testCpPluginLoader()