summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/main.cpp
authorgroucho <groucho>2003-05-07 09:01:39 (UTC)
committer groucho <groucho>2003-05-07 09:01:39 (UTC)
commit118d03d815a7615b9c53363218a7ac45b3f4c514 (patch) (unidiff)
tree356953e2413cddcec0f35bd47bb6439767da7051 /noncore/apps/opie-reader/main.cpp
parent00894537decf01c5a5cdc565b2740b5e67a2e90f (diff)
downloadopie-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) (show whitespace changes)
-rw-r--r--noncore/apps/opie-reader/main.cpp24
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,10 +1,17 @@
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
8QTReaderApp* app = NULL; 15QTReaderApp* app = NULL;
9 16
10void handler(int signum) 17void handler(int signum)
@@ -16,18 +23,27 @@ void handler(int signum)
16 } 23 }
17 signal(signum, handler); 24 signal(signum, handler);
18} 25}
26#endif
19 27
20int main( int argc, char ** argv ) 28int 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}