author | mickeyl <mickeyl> | 2004-04-07 13:36:16 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-07 13:36:16 (UTC) |
commit | 4f1d28a25ce6180850c3d26bac9b638f0f25532b (patch) (unidiff) | |
tree | 59b4879b1065086c9a2e28f16f7d48540c8a9456 /core/launcher/main.cpp | |
parent | 8af35b63a277ec14dcc4a0a6ca5bbe228e276b98 (diff) | |
download | opie-4f1d28a25ce6180850c3d26bac9b638f0f25532b.zip opie-4f1d28a25ce6180850c3d26bac9b638f0f25532b.tar.gz opie-4f1d28a25ce6180850c3d26bac9b638f0f25532b.tar.bz2 |
use Opie debugging framework
-rw-r--r-- | core/launcher/main.cpp | 42 |
1 files changed, 18 insertions, 24 deletions
diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp index 3e7e0d2..a86aca6 100644 --- a/core/launcher/main.cpp +++ b/core/launcher/main.cpp | |||
@@ -18,56 +18,50 @@ | |||
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #ifndef QTOPIA_INTERNAL_FILEOPERATIONS | 21 | #ifndef QTOPIA_INTERNAL_FILEOPERATIONS |
22 | #define QTOPIA_INTERNAL_FILEOPERATIONS | 22 | #define QTOPIA_INTERNAL_FILEOPERATIONS |
23 | #endif | 23 | #endif |
24 | #ifdef QT_QWS_LOGIN | ||
25 | #include "../login/qdmdialogimpl.h" | ||
26 | #endif | ||
27 | #include "calibrate.h" | ||
24 | #include "server.h" | 28 | #include "server.h" |
25 | #include "serverapp.h" | 29 | #include "serverapp.h" |
26 | #include "stabmon.h" | 30 | #include "stabmon.h" |
27 | #include "firstuse.h" | 31 | #include "firstuse.h" |
28 | 32 | ||
33 | /* OPIE */ | ||
34 | #include <opie2/odebug.h> | ||
35 | #include <opie2/odevice.h> | ||
29 | #include <opie2/oglobal.h> | 36 | #include <opie2/oglobal.h> |
30 | |||
31 | #include <qtopia/network.h> | 37 | #include <qtopia/network.h> |
32 | //#include <qtopia/custom.h> | 38 | #include <qtopia/alarmserver.h> |
33 | 39 | using namespace Opie::Core; | |
34 | 40 | ||
41 | /* QT */ | ||
35 | #include <qdir.h> | 42 | #include <qdir.h> |
43 | #include <qmessagebox.h> | ||
36 | #ifdef QWS | 44 | #ifdef QWS |
37 | #include <qwindowsystem_qws.h> | 45 | #include <qwindowsystem_qws.h> |
38 | #include <qtopia/qcopenvelope_qws.h> | 46 | #include <qtopia/qcopenvelope_qws.h> |
39 | #endif | 47 | #endif |
40 | #include <qtopia/alarmserver.h> | 48 | #ifdef Q_WS_QWS |
49 | #include <qkeyboard_qws.h> | ||
50 | #endif | ||
41 | 51 | ||
52 | /* STD */ | ||
42 | #include <stdlib.h> | 53 | #include <stdlib.h> |
43 | #include <stdio.h> | 54 | #include <stdio.h> |
44 | #include <signal.h> | 55 | #include <signal.h> |
45 | #ifndef Q_OS_WIN32 | 56 | #ifndef Q_OS_WIN32 |
46 | #include <unistd.h> | 57 | #include <unistd.h> |
47 | #else | 58 | #else |
48 | #include <process.h> | 59 | #include <process.h> |
49 | #endif | 60 | #endif |
50 | 61 | ||
51 | #include "calibrate.h" | ||
52 | |||
53 | |||
54 | #ifdef QT_QWS_LOGIN | ||
55 | #include "../login/qdmdialogimpl.h" | ||
56 | #endif | ||
57 | |||
58 | #ifdef Q_WS_QWS | ||
59 | #include <qkeyboard_qws.h> | ||
60 | #endif | ||
61 | |||
62 | #include <qmessagebox.h> | ||
63 | #include <opie2/odevice.h> | ||
64 | |||
65 | using namespace Opie::Core; | ||
66 | |||
67 | |||
68 | static void cleanup() | 62 | static void cleanup() |
69 | { | 63 | { |
70 | QDir dir( "/tmp", "qcop-msg-*" ); | 64 | QDir dir( "/tmp", "qcop-msg-*" ); |
71 | 65 | ||
72 | QStringList stale = dir.entryList(); | 66 | QStringList stale = dir.entryList(); |
73 | QStringList::Iterator it; | 67 | QStringList::Iterator it; |
@@ -118,13 +112,13 @@ static void refreshTimeZoneConfig() | |||
118 | // translations of TimeZone name | 112 | // translations of TimeZone name |
119 | zoneIndex = 0; | 113 | zoneIndex = 0; |
120 | while (cfg.hasKey( "Zone"+ QString::number( zoneIndex ))){ | 114 | while (cfg.hasKey( "Zone"+ QString::number( zoneIndex ))){ |
121 | zoneID = cfg.readEntry( "Zone" + QString::number( zoneIndex )); | 115 | zoneID = cfg.readEntry( "Zone" + QString::number( zoneIndex )); |
122 | curZone = TimeZone( zoneID ); | 116 | curZone = TimeZone( zoneID ); |
123 | if ( !curZone.isValid() ){ | 117 | if ( !curZone.isValid() ){ |
124 | qDebug( "initEnvironment() Invalid TimeZone %s", zoneID.latin1() ); | 118 | odebug << "initEnvironment() Invalid TimeZone " << zoneID << "" << oendl; |
125 | break; | 119 | break; |
126 | } | 120 | } |
127 | cfg.writeEntry( "ZoneName" + QString::number( zoneIndex ), curZone.city() ); | 121 | cfg.writeEntry( "ZoneName" + QString::number( zoneIndex ), curZone.city() ); |
128 | zoneIndex++; | 122 | zoneIndex++; |
129 | } | 123 | } |
130 | #endif | 124 | #endif |
@@ -266,13 +260,13 @@ int initApplication( int argc, char ** argv ) | |||
266 | e << QString ( ); | 260 | e << QString ( ); |
267 | } | 261 | } |
268 | } | 262 | } |
269 | 263 | ||
270 | int rv = a.exec(); | 264 | int rv = a.exec(); |
271 | 265 | ||
272 | qDebug("exiting..."); | 266 | odebug << "exiting..." << oendl; |
273 | delete s; | 267 | delete s; |
274 | 268 | ||
275 | #ifndef Q_OS_MACX | 269 | #ifndef Q_OS_MACX |
276 | ODevice::inst()->setSoftSuspend( false ); | 270 | ODevice::inst()->setSoftSuspend( false ); |
277 | #endif | 271 | #endif |
278 | 272 | ||
@@ -338,13 +332,13 @@ int main( int argc, char ** argv ) | |||
338 | 332 | ||
339 | int main( int argc, char ** argv ) | 333 | int main( int argc, char ** argv ) |
340 | { | 334 | { |
341 | int retVal = initApplication( argc, argv ); | 335 | int retVal = initApplication( argc, argv ); |
342 | 336 | ||
343 | if ( DesktopApplication::doRestart ) { | 337 | if ( DesktopApplication::doRestart ) { |
344 | qDebug("Trying to restart"); | 338 | odebug << "Trying to restart" << oendl; |
345 | execl( (QPEApplication::qpeDir()+"bin\\qpe").latin1(), "qpe", 0 ); | 339 | execl( (QPEApplication::qpeDir()+"bin\\qpe").latin1(), "qpe", 0 ); |
346 | } | 340 | } |
347 | 341 | ||
348 | return retVal; | 342 | return retVal; |
349 | } | 343 | } |
350 | 344 | ||