Diffstat (limited to 'noncore/settings/aqpkg/main.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/main.cpp | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/noncore/settings/aqpkg/main.cpp b/noncore/settings/aqpkg/main.cpp index e943e49..1f8cf42 100644 --- a/noncore/settings/aqpkg/main.cpp +++ b/noncore/settings/aqpkg/main.cpp | |||
@@ -1,61 +1,65 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | main.cpp - description | 2 | main.cpp - description |
3 | ------------------- | 3 | ------------------- |
4 | begin : Mon Aug 26 13:32:30 BST 2002 | 4 | begin : Mon Aug 26 13:32:30 BST 2002 |
5 | copyright : (C) 2002 by Andy Qua | 5 | copyright : (C) 2002 by Andy Qua |
6 | email : andy.qua@blueyonder.co.uk | 6 | email : andy.qua@blueyonder.co.uk |
7 | ***************************************************************************/ | 7 | ***************************************************************************/ |
8 | 8 | ||
9 | /*************************************************************************** | 9 | /*************************************************************************** |
10 | * * | 10 | * * |
11 | * This program is free software; you can redistribute it and/or modify * | 11 | * This program is free software; you can redistribute it and/or modify * |
12 | * it under the terms of the GNU General Public License as published by * | 12 | * it under the terms of the GNU General Public License as published by * |
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | * the Free Software Foundation; either version 2 of the License, or * |
14 | * (at your option) any later version. * | 14 | * (at your option) any later version. * |
15 | * * | 15 | * * |
16 | ***************************************************************************/ | 16 | ***************************************************************************/ |
17 | 17 | ||
18 | #include <iostream> | ||
19 | using namespace std; | ||
20 | |||
18 | #ifdef QWS | 21 | #ifdef QWS |
19 | #include <qpe/qpeapplication.h> | 22 | #include <qpe/qpeapplication.h> |
23 | #include <qpe/qcopenvelope_qws.h> | ||
20 | #else | 24 | #else |
21 | #include <qapplication.h> | 25 | #include <qapplication.h> |
22 | #endif | 26 | #endif |
23 | 27 | ||
24 | #include <qobjectdefs.h> | 28 | #include <qobjectdefs.h> |
25 | 29 | ||
26 | #include "mainwin.h" | 30 | #include "mainwin.h" |
27 | #include "server.h" | 31 | #include "server.h" |
28 | 32 | ||
29 | #include "global.h" | 33 | #include "global.h" |
30 | 34 | ||
31 | 35 | ||
32 | /* | ||
33 | int main2(int argc, char *argv[]) | ||
34 | { | ||
35 | Server local( "local", "", "status" ); | ||
36 | local.readPackageFile(); | ||
37 | |||
38 | Server s( "opiecvs", "aaa" ); | ||
39 | s.readPackageFile( &local ); | ||
40 | |||
41 | } | ||
42 | */ | ||
43 | |||
44 | int main(int argc, char *argv[]) | 36 | int main(int argc, char *argv[]) |
45 | { | 37 | { |
38 | cout << "Root dir = " << ROOT << endl; | ||
46 | #ifdef QWS | 39 | #ifdef QWS |
47 | QPEApplication a( argc, argv ); | 40 | QPEApplication a( argc, argv ); |
48 | #else | 41 | #else |
49 | QApplication a( argc, argv ); | 42 | QApplication a( argc, argv ); |
50 | #endif | 43 | #endif |
51 | 44 | ||
45 | #ifdef QWS | ||
46 | // Disable suspend mode | ||
47 | cout << "Disabling suspend mode" << endl; | ||
48 | QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::DisableSuspend; | ||
49 | #endif | ||
50 | |||
52 | MainWindow *win = new MainWindow(); | 51 | MainWindow *win = new MainWindow(); |
53 | a.setMainWidget(win); | 52 | a.setMainWidget(win); |
54 | win->show(); | 53 | win->show(); |
55 | 54 | ||
56 | a.exec(); | 55 | a.exec(); |
57 | 56 | ||
57 | #ifdef QWS | ||
58 | // Reenable suspend mode | ||
59 | cout << "Enabling suspend mode" << endl; | ||
60 | QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable; | ||
61 | #endif | ||
58 | #ifdef _DEBUG | 62 | #ifdef _DEBUG |
59 | DumpUnfreed(); | 63 | DumpUnfreed(); |
60 | #endif | 64 | #endif |
61 | } | 65 | } |