searchui/indevicehandler/tsrc/t_indevicehandler/src/t_indevicehandler.cpp
changeset 20 68cdadcf169e
parent 17 7d8c8d8f5eab
child 21 708468d5143e
equal deleted inserted replaced
17:7d8c8d8f5eab 20:68cdadcf169e
   134 
   134 
   135 //QTEST_MAIN corrected since crashes if TRAP not in correct place.
   135 //QTEST_MAIN corrected since crashes if TRAP not in correct place.
   136 //Will be corrected in later (estimate 4.6.0) Qt release for Symbian.
   136 //Will be corrected in later (estimate 4.6.0) Qt release for Symbian.
   137 int main(int argc, char *argv[])
   137 int main(int argc, char *argv[])
   138     {
   138     {
   139     QApplication app(argc, argv);
   139     QCoreApplication app(argc, argv);
   140     int error = 0;
   140 #ifdef __WINSCW__
   141     TRAPD(err,
   141     char *new_argv[3];
   142             QTEST_DISABLE_KEYPAD_NAVIGATION
   142     QString str = "C:\\data\\" + QFileInfo(
   143             SearchInDeviceHandlerTest tc;
   143             QCoreApplication::applicationFilePath()).baseName() + ".log";
   144             error = QTest::qExec(&tc, argc, argv););
   144     QByteArray bytes = str.toAscii();
   145     Q_UNUSED(err);
   145     char arg1[] = "-o";
   146     return error;
   146     new_argv[0] = argv[0];
       
   147     new_argv[1] = arg1;
       
   148     new_argv[2] = bytes.data();
       
   149     SearchInDeviceHandlerTest tc;
       
   150     return QTest::qExec(&tc, 3, new_argv);
       
   151 #else
       
   152     SearchInDeviceHandlerTest tc;
       
   153     return QTest::qExec(&tc, argc, argv);
       
   154 #endif
       
   155 
   147     }
   156     }
   148 #else //Q_OS_SYMBIAN
   157 #else //Q_OS_SYMBIAN
   149 QTEST_MAIN(SearchInDeviceHandlerTest)
   158 QTEST_MAIN(SearchInDeviceHandlerTest)
   150 #endif //Q_OS_SYMBIAN    
   159 #endif //Q_OS_SYMBIAN    
   151     
   160