Diffstat (limited to 'noncore/apps/opie-reader/main.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/main.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/noncore/apps/opie-reader/main.cpp b/noncore/apps/opie-reader/main.cpp index 3e1f5e7..af276da 100644 --- a/noncore/apps/opie-reader/main.cpp +++ b/noncore/apps/opie-reader/main.cpp | |||
@@ -1,49 +1,48 @@ | |||
1 | #include "useqpe.h" | ||
2 | #ifdef USEQPE | 1 | #ifdef USEQPE |
3 | #include <qpe/qpeapplication.h> | 2 | #include <qpe/qpeapplication.h> |
4 | #else | 3 | #else |
5 | #include <qapplication.h> | 4 | #include <qapplication.h> |
6 | #endif | 5 | #endif |
7 | #include "QTReaderApp.h" | 6 | #include "QTReaderApp.h" |
8 | 7 | ||
9 | #include "signal.h" | 8 | #include "signal.h" |
10 | #include "stdio.h" | 9 | #include "stdio.h" |
11 | #include "time.h" | 10 | #include "time.h" |
12 | 11 | ||
13 | 12 | ||
14 | #ifdef USEQPE | 13 | #ifdef USEQPE |
15 | QTReaderApp* app = NULL; | 14 | QTReaderApp* app = NULL; |
16 | 15 | ||
17 | void handler(int signum) | 16 | void handler(int signum) |
18 | { | 17 | { |
19 | if (app != NULL) | 18 | if (app != NULL) |
20 | { | 19 | { |
21 | app->suspend(); | 20 | app->suspend(); |
22 | app->saveprefs(); | 21 | app->saveprefs(); |
23 | } | 22 | } |
24 | signal(signum, handler); | 23 | signal(signum, handler); |
25 | } | 24 | } |
26 | #endif | 25 | #endif |
27 | 26 | ||
28 | int main( int argc, char ** argv ) | 27 | int main( int argc, char ** argv ) |
29 | { | 28 | { |
30 | 29 | ||
31 | #ifdef USEQPE | 30 | #ifdef USEQPE |
32 | signal(SIGCONT, handler); | 31 | signal(SIGCONT, handler); |
33 | QPEApplication a( argc, argv ); | 32 | QPEApplication a( argc, argv ); |
34 | QTReaderApp m; | 33 | QTReaderApp m; |
35 | a.showMainDocumentWidget( &m ); | 34 | a.showMainDocumentWidget( &m ); |
36 | app = &m; | 35 | app = &m; |
37 | #else | 36 | #else |
38 | QApplication a( argc, argv ); | 37 | QApplication a( argc, argv ); |
39 | QTReaderApp m; | 38 | QTReaderApp m; |
40 | a.setMainWidget( &m ); | 39 | a.setMainWidget( &m ); |
41 | if (argc > 1) | 40 | if (argc > 1) |
42 | { | 41 | { |
43 | m.setDocument(argv[1]); | 42 | m.setDocument(argv[1]); |
44 | } | 43 | } |
45 | #endif | 44 | #endif |
46 | 45 | ||
47 | 46 | ||
48 | return a.exec(); | 47 | return a.exec(); |
49 | } | 48 | } |