25 |
25 |
26 #include <hbapplication.h> |
26 #include <hbapplication.h> |
27 #include <hbmainwindow.h> |
27 #include <hbmainwindow.h> |
28 #include "themechangerdefs.h" |
28 #include "themechangerdefs.h" |
29 #include "themeselectionlist.h" |
29 #include "themeselectionlist.h" |
30 |
30 #include <QTextStream> |
31 #ifdef Q_OS_SYMBIAN |
31 #ifdef Q_OS_SYMBIAN |
32 #include "themeclientsymbian.h" |
32 #include "themeclientsymbian.h" |
33 #else |
33 #else |
34 #include "themeclientqt.h" |
34 #include "themeclientqt.h" |
35 #endif |
35 #endif |
36 |
36 |
|
37 #ifdef THEME_CHANGER_TIMER_LOG |
|
38 void debugOutput(QtMsgType type, const char *msg) |
|
39 { |
|
40 QFile file("c:/data/logs/themechanger.txt"); |
|
41 |
|
42 if (!file.open(QIODevice::Append)) |
|
43 return; |
|
44 QTextStream out(&file); |
|
45 |
|
46 switch (type) |
|
47 { |
|
48 case QtDebugMsg: |
|
49 out << msg << QChar::LineSeparator; |
|
50 break; |
|
51 case QtWarningMsg: |
|
52 break; |
|
53 case QtCriticalMsg: |
|
54 break; |
|
55 case QtFatalMsg: |
|
56 break; |
|
57 } |
|
58 } |
|
59 #endif //THEME_CHANGER_TIMER_LOG |
|
60 |
37 int main(int argc, char *argv[]) |
61 int main(int argc, char *argv[]) |
38 { |
62 { |
|
63 #ifdef THEME_CHANGER_TIMER_LOG |
|
64 qInstallMsgHandler(debugOutput); |
|
65 #endif |
39 // Initialization |
66 // Initialization |
40 HbApplication app(argc, argv); |
67 HbApplication app(argc, argv); |
41 app.setApplicationName("ThemeChanger"); |
68 app.setApplicationName("ThemeChanger"); |
42 // Main window widget. |
69 // Main window widget. |
43 // Includes decorators such as signal strength and battery life indicator. |
70 // Includes decorators such as signal strength and battery life indicator. |