From 2d0c1ffcb39f9fac8193ed2e9e93794de0bd7975 Mon Sep 17 00:00:00 2001 From: llornkcor Date: Sat, 14 Sep 2002 02:19:09 +0000 Subject: update by Tim --- (limited to 'noncore/apps/opie-reader/main.cpp') diff --git a/noncore/apps/opie-reader/main.cpp b/noncore/apps/opie-reader/main.cpp index e37f12c..08f59a8 100644 --- a/noncore/apps/opie-reader/main.cpp +++ b/noncore/apps/opie-reader/main.cpp @@ -1,38 +1,30 @@ #include -//#include #include "QTReaderApp.h" +#include "signal.h" +#include "stdio.h" +#include "time.h" +QTReaderApp* app = NULL; - - -/* -class myapp : public QPEApplication +void handler(int signum) { - public slots: - void receive( const QCString& msg, const QByteArray& data ) - { - - QDataStream stream( data, IO_ReadOnly ); - if ( msg == "someMessage(int,int,int)" ) { - int a,b,c; - stream >> a >> b >> c; - ... - } else if ( msg == "otherMessage(QString)" ) { - ... - } - - } + if (app != NULL) app->saveprefs(); + signal(signum, handler); } -*/ int main( int argc, char ** argv ) { + signal(SIGCONT, handler); + QPEApplication a( argc, argv ); QTReaderApp m; + a.showMainDocumentWidget( &m ); + app = &m; + return a.exec(); } -- cgit v0.9.0.2