--- a/controlpanel/tsrc/unit/ut_cpapi/src/ut_cpapi.cpp Thu Apr 01 03:31:13 2010 +0800
+++ b/controlpanel/tsrc/unit/ut_cpapi/src/ut_cpapi.cpp Fri Apr 16 11:40:46 2010 +0800
@@ -25,8 +25,8 @@
#include <hbdataform.h>
#include <hbdataformmodel.h>
#include <hbdataformmodelitem.h>
+#include <hbdataformviewitem.h>
#include <hbabstractviewitem.h>
-#include <hbsettingformitem.h>
#include <hbpushbutton.h>
//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<HbAbstractViewItem *> oldList = form->itemPrototypes();
CpPluginUtility::addCpItemPrototype(form);
QList<HbAbstractViewItem *> newList = form->itemPrototypes();
- QVERIFY( oldList.count() == newList.count()-1 );
+ QVERIFY( oldList.count() < newList.count() );
}
void TestCpAPI::testCpPluginLoader()