ftuapplication/src/main.cpp
changeset 9 aa22d2c19e57
parent 0 c464cd7e2753
child 14 88ff81299c11
equal deleted inserted replaced
7:446dc0e90e84 9:aa22d2c19e57
    21 
    21 
    22 #include <QtGui>
    22 #include <QtGui>
    23 #include <hbapplication.h>
    23 #include <hbapplication.h>
    24 #include <QTranslator>
    24 #include <QTranslator>
    25 #include <QLocale>
    25 #include <QLocale>
       
    26 #include <QTime>
       
    27 #include <QDebug>
    26 
    28 
    27 // ---------------------------------------------------------------------------
    29 // ---------------------------------------------------------------------------
    28 // main
    30 // main
    29 // ---------------------------------------------------------------------------
    31 // ---------------------------------------------------------------------------
    30 //
    32 //
    31 int main(int argc, char *argv[])
    33 int main(int argc, char *argv[])
    32 {
    34 {
       
    35     QDEBUG(__FILE__<<__FUNCTION__<<"~~~~~~~"<<QTime::currentTime().toString("hh:mm:ss.zzz");)
    33     FTUTEST_FUNC_ENTRY("FTU::FtuFirstTimeUse::main");
    36     FTUTEST_FUNC_ENTRY("FTU::FtuFirstTimeUse::main");
    34     
    37     
    35     HbApplication app(argc, argv);    
    38     HbApplication app(argc, argv);    
    36 
    39 
    37     QTranslator translator;
    40     QTranslator translator;
    62     FtuFirstTimeUse ftuFirstTimeUse;
    65     FtuFirstTimeUse ftuFirstTimeUse;
    63 #ifdef ROM
    66 #ifdef ROM
    64     QDir::setCurrent("Z:/");    
    67     QDir::setCurrent("Z:/");    
    65 #else
    68 #else
    66     QDir::setCurrent("C:/");
    69     QDir::setCurrent("C:/");
    67     FTUDEBUG("main() - FtuApplication's current dir set to C:/");
    70     QDEBUG("main() - FtuApplication's current dir set to C:/");
    68 #endif //ROM
    71 #endif //ROM
    69     QObject::connect(&app,SIGNAL(aboutToQuit()),&ftuFirstTimeUse,SLOT(stop()));
    72     QObject::connect(&app,SIGNAL(aboutToQuit()),&ftuFirstTimeUse,SLOT(stop()));
    70     QObject::connect(&ftuFirstTimeUse, SIGNAL(exit()), &app, SLOT(quit()),Qt::QueuedConnection);    
    73     QObject::connect(&ftuFirstTimeUse, SIGNAL(exit()), &app, SLOT(quit()),Qt::QueuedConnection);    
    71     ftuFirstTimeUse.start();
    74     ftuFirstTimeUse.start();
    72     int ret = app.exec();
    75     int ret = app.exec();
    73     FTUTEST_FUNC_EXIT("FTU::FtuFirstTimeUse::main");
    76     QDEBUG("FTU::FtuFirstTimeUse::main");
       
    77     //Work around to make sure that ftu exits
       
    78     User::Exit(0);
    74     return ret;       
    79     return ret;       
    75 }
    80 }