author | groucho <groucho> | 2003-05-07 09:01:39 (UTC) |
---|---|---|
committer | groucho <groucho> | 2003-05-07 09:01:39 (UTC) |
commit | 118d03d815a7615b9c53363218a7ac45b3f4c514 (patch) (unidiff) | |
tree | 356953e2413cddcec0f35bd47bb6439767da7051 /noncore/apps/opie-reader/main.cpp | |
parent | 00894537decf01c5a5cdc565b2740b5e67a2e90f (diff) | |
download | opie-118d03d815a7615b9c53363218a7ac45b3f4c514.zip opie-118d03d815a7615b9c53363218a7ac45b3f4c514.tar.gz opie-118d03d815a7615b9c53363218a7ac45b3f4c514.tar.bz2 |
Incorporated TimWs current source tree and make it compile
Diffstat (limited to 'noncore/apps/opie-reader/main.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/main.cpp | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/noncore/apps/opie-reader/main.cpp b/noncore/apps/opie-reader/main.cpp index 2440037..3e1f5e7 100644 --- a/noncore/apps/opie-reader/main.cpp +++ b/noncore/apps/opie-reader/main.cpp | |||
@@ -1,11 +1,18 @@ | |||
1 | #include "useqpe.h" | ||
2 | #ifdef USEQPE | ||
1 | #include <qpe/qpeapplication.h> | 3 | #include <qpe/qpeapplication.h> |
4 | #else | ||
5 | #include <qapplication.h> | ||
6 | #endif | ||
2 | #include "QTReaderApp.h" | 7 | #include "QTReaderApp.h" |
3 | 8 | ||
4 | #include "signal.h" | 9 | #include "signal.h" |
5 | #include "stdio.h" | 10 | #include "stdio.h" |
6 | #include "time.h" | 11 | #include "time.h" |
7 | 12 | ||
13 | |||
14 | #ifdef USEQPE | ||
8 | QTReaderApp* app = NULL; | 15 | QTReaderApp* app = NULL; |
9 | 16 | ||
10 | void handler(int signum) | 17 | void handler(int signum) |
11 | { | 18 | { |
@@ -15,20 +22,29 @@ void handler(int signum) | |||
15 | app->saveprefs(); | 22 | app->saveprefs(); |
16 | } | 23 | } |
17 | signal(signum, handler); | 24 | signal(signum, handler); |
18 | } | 25 | } |
26 | #endif | ||
19 | 27 | ||
20 | int main( int argc, char ** argv ) | 28 | int main( int argc, char ** argv ) |
21 | { | 29 | { |
22 | signal(SIGCONT, handler); | ||
23 | 30 | ||
31 | #ifdef USEQPE | ||
32 | signal(SIGCONT, handler); | ||
24 | QPEApplication a( argc, argv ); | 33 | QPEApplication a( argc, argv ); |
25 | |||
26 | QTReaderApp m; | 34 | QTReaderApp m; |
27 | |||
28 | a.showMainDocumentWidget( &m ); | 35 | a.showMainDocumentWidget( &m ); |
29 | |||
30 | app = &m; | 36 | app = &m; |
37 | #else | ||
38 | QApplication a( argc, argv ); | ||
39 | QTReaderApp m; | ||
40 | a.setMainWidget( &m ); | ||
41 | if (argc > 1) | ||
42 | { | ||
43 | m.setDocument(argv[1]); | ||
44 | } | ||
45 | #endif | ||
46 | |||
31 | 47 | ||
32 | return a.exec(); | 48 | return a.exec(); |
33 | } | 49 | } |
34 | 50 | ||