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