19 #include "ftufirsttimeuse.h" |
19 #include "ftufirsttimeuse.h" |
20 #include "ftutest_global.h" |
20 #include "ftutest_global.h" |
21 |
21 |
22 #include <QtGui> |
22 #include <QtGui> |
23 #include <hbapplication.h> |
23 #include <hbapplication.h> |
24 #include <QTranslator> |
24 #include <HbTranslator> |
25 #include <QLocale> |
25 #include <QLocale> |
26 #include <QTime> |
26 #include <QTime> |
27 #include <QDebug> |
27 #include <QDebug> |
28 |
28 |
29 // --------------------------------------------------------------------------- |
29 // --------------------------------------------------------------------------- |
35 QDEBUG(__FILE__<<__FUNCTION__<<"~~~~~~~"<<QTime::currentTime().toString("hh:mm:ss.zzz");) |
35 QDEBUG(__FILE__<<__FUNCTION__<<"~~~~~~~"<<QTime::currentTime().toString("hh:mm:ss.zzz");) |
36 FTUTEST_FUNC_ENTRY("FTU::FtuFirstTimeUse::main"); |
36 FTUTEST_FUNC_ENTRY("FTU::FtuFirstTimeUse::main"); |
37 |
37 |
38 HbApplication app(argc, argv); |
38 HbApplication app(argc, argv); |
39 |
39 |
40 QTranslator translator; |
|
41 |
40 |
42 QString translation = "ftu_"; |
41 HbTranslator *translator = new HbTranslator("/resource/qt/translations/","firsttimesetup"); |
43 if(argc > 1){ |
42 |
44 translation.append(argv[1]); |
|
45 } |
|
46 else{ |
|
47 // another option to load locale could be QLocale::system().language()) |
|
48 translation.append(QLocale::system().name()); // this seems to be ftu_en_US in Windows and ftu_en_GB in WINSCW emulator and hardware |
|
49 } |
|
50 translator.load(translation, ":/translations" ); |
|
51 app.installTranslator(&translator); |
|
52 |
|
53 QString exampleWizardsTranslation = "ftuexamplewizards_"; |
|
54 if(argc > 1){ |
|
55 exampleWizardsTranslation.append(argv[1]); |
|
56 } |
|
57 else{ |
|
58 exampleWizardsTranslation.append(QLocale::system().name()); |
|
59 } |
|
60 QTranslator exampleWizardsTranslator; |
|
61 |
|
62 exampleWizardsTranslator.load(exampleWizardsTranslation, ":/translations" ); |
|
63 app.installTranslator(&exampleWizardsTranslator); |
|
64 |
|
65 FtuFirstTimeUse ftuFirstTimeUse; |
43 FtuFirstTimeUse ftuFirstTimeUse; |
66 #ifdef ROM |
44 #ifdef ROM |
67 QDir::setCurrent("Z:/"); |
45 QDir::setCurrent("Z:/"); |
68 #else |
46 #else |
69 QDir::setCurrent("C:/"); |
47 QDir::setCurrent("C:/"); |