phonesettings/cpphonesettingsplugins/divertplugin/tsrc/ut_cpdivertselectionitem/qtestmains60ui.h
changeset 22 6bb1b21d2484
parent 21 92ab7f8d0eab
equal deleted inserted replaced
21:92ab7f8d0eab 22:6bb1b21d2484
    24 char *new_argv[3];
    24 char *new_argv[3];
    25 HbMainWindow *mainWindow;
    25 HbMainWindow *mainWindow;
    26 #define QTEST_MAIN_S60UI(TestObject) \
    26 #define QTEST_MAIN_S60UI(TestObject) \
    27 int main(int argc, char *argv[]) \
    27 int main(int argc, char *argv[]) \
    28 { \
    28 { \
    29 \
    29 HbApplication *app = new HbApplication(argc, argv); \
    30 QString str = "C:\\data\\" + QFileInfo(QCoreApplication::applicationFilePath()).baseName() + ".log"; \
    30 QString str = "C:\\data\\" + QFileInfo(QCoreApplication::applicationFilePath()).baseName() + ".log"; \
    31 QByteArray   bytes  = str.toAscii(); \
    31 QByteArray   bytes  = str.toAscii(); \
    32 \
    32 \
    33 char arg1[] = "-o"; \
    33 char arg1[] = "-o"; \
    34 \
    34 \
    35 new_argv[0] = argv[0]; \
    35 new_argv[0] = argv[0]; \
    36 new_argv[1] = arg1; \
    36 new_argv[1] = arg1; \
    37 new_argv[2] = bytes.data(); \
    37 new_argv[2] = bytes.data(); \
    38 \
    38 \
    39 HbApplication *app = new HbApplication(argc, argv); \
       
    40 TestObject tc; \
    39 TestObject tc; \
    41 QResource::registerResource("../hbcore.rcc"); \
    40 QResource::registerResource("../hbcore.rcc"); \
    42 mainWindow = new HbMainWindow;\
    41 mainWindow = new HbMainWindow;\
    43 mainWindow->show(); \
    42 mainWindow->show(); \
    44 int ret = QTest::qExec(&tc, 3, new_argv); \
    43 int ret = QTest::qExec(&tc, 3, new_argv); \