searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/src/t_searchstateprovider.cpp
changeset 23 af30d8015c58
parent 20 68cdadcf169e
equal deleted inserted replaced
20:68cdadcf169e 23:af30d8015c58
    25 #include <hbsearchpanel.h>
    25 #include <hbsearchpanel.h>
    26 #include <hbinstance.h>
    26 #include <hbinstance.h>
    27 #include <hbmainwindow.h>
    27 #include <hbmainwindow.h>
    28 #include <hbview.h>
    28 #include <hbview.h>
    29 #include <hbgraphicsscene.h>
    29 #include <hbgraphicsscene.h>
       
    30 #include <hbapplication.h>
       
    31 #include <hbnamespace.h>
    30 
    32 
    31 // ---------------------------------------------------------------------------
    33 // ---------------------------------------------------------------------------
    32 // ---------------------------------------------------------------------------
    34 // ---------------------------------------------------------------------------
    33 //
    35 //
    34 
    36 
   175 
   177 
   176 //QTEST_MAIN corrected since crashes if TRAP not in correct place.
   178 //QTEST_MAIN corrected since crashes if TRAP not in correct place.
   177 //Will be corrected in later (estimate 4.6.0) Qt release for Symbian.
   179 //Will be corrected in later (estimate 4.6.0) Qt release for Symbian.
   178 int main(int argc, char *argv[])
   180 int main(int argc, char *argv[])
   179     {
   181     {
   180     QCoreApplication app(argc, argv);
   182     HbApplication app(argc, argv);
   181 #ifdef __WINSCW__
       
   182     char *new_argv[3];
       
   183     QString str = "C:\\data\\" + QFileInfo(
       
   184             QCoreApplication::applicationFilePath()).baseName() + ".log";
       
   185     QByteArray bytes = str.toAscii();
       
   186     char arg1[] = "-o";
       
   187     new_argv[0] = argv[0];
       
   188     new_argv[1] = arg1;
       
   189     new_argv[2] = bytes.data();
       
   190     SearchStateProviderTest tc;
   183     SearchStateProviderTest tc;
   191     return QTest::qExec(&tc, 3, new_argv);
   184        
   192 #else
   185     int ret = QTest::qExec(&tc, argc, argv);
   193     SearchStateProviderTest tc;
   186     return ret;
   194     return QTest::qExec(&tc, argc, argv);
       
   195 #endif
       
   196     }
   187     }
   197 #else //Q_OS_SYMBIAN
   188 #else //Q_OS_SYMBIAN
   198 QTEST_MAIN(SearchStateProviderTest)
   189 QTEST_MAIN(SearchStateProviderTest)
   199 #endif //Q_OS_SYMBIAN
   190 #endif //Q_OS_SYMBIAN