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,3 +1,8 @@ | |||
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 | ||
@@ -6,4 +11,6 @@ | |||
6 | #include "time.h" | 11 | #include "time.h" |
7 | 12 | ||
13 | |||
14 | #ifdef USEQPE | ||
8 | QTReaderApp* app = NULL; | 15 | QTReaderApp* app = NULL; |
9 | 16 | ||
@@ -17,16 +24,25 @@ void handler(int signum) | |||
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(); |