-rw-r--r-- | library/qpeapplication.cpp | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index b5dff3a..c41dd06 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp @@ -87,55 +87,50 @@ #include <sys/soundcard.h> #include "qt_override_p.h" class QPEApplicationData { public: - QPEApplicationData() : presstimer( 0 ), presswidget( 0 ), rightpressed( FALSE ), - kbgrabber( 0 ), kbregrab( FALSE ), notbusysent( FALSE ), preloaded( FALSE ), - forceshow( FALSE ), nomaximize( FALSE ), qpe_main_widget( 0 ), - keep_running( TRUE ) + QPEApplicationData() : presstimer( 0 ), presswidget( 0 ), kbgrabber( 0 ), + rightpressed( FALSE ), kbregrab( FALSE ), notbusysent( FALSE ), preloaded( FALSE ), + forceshow( FALSE ), nomaximize( FALSE ), keep_running( TRUE ), qpe_main_widget( 0 ) + { qcopq.setAutoDelete( TRUE ); } int presstimer; QWidget* presswidget; - QPoint presspos; -bool rightpressed : - 1; // AEH why not use uint foobar :1; if it's tt style -zecke int kbgrabber; -bool kbregrab : - 1; -bool notbusysent : - 1; + QPoint presspos; + + bool rightpressed : 1; + bool kbregrab : 1; + bool notbusysent : 1; + bool preloaded : 1; + bool forceshow : 1; + bool nomaximize : 1; + bool keep_running : 1; + QString appName; struct QCopRec { QCopRec( const QCString &ch, const QCString &msg, const QByteArray &d ) : channel( ch ), message( msg ), data( d ) { } QCString channel; QCString message; QByteArray data; }; -bool preloaded : - 1; -bool forceshow : - 1; -bool nomaximize : - 1; QWidget* qpe_main_widget; -bool keep_running : - 1; QList<QCopRec> qcopq; void enqueueQCop( const QCString &ch, const QCString &msg, const QByteArray &data ) { qcopq.append( new QCopRec( ch, msg, data ) ); } void sendQCopQ() @@ -206,17 +201,19 @@ bool keep_running : show_mx(mw, nomax); } } void loadTextCodecs() { QString path = QPEApplication::qpeDir() + "/plugins/textcodecs"; QDir dir( path, "lib*.so" ); - QStringList list = dir.entryList(); + QStringList list; + if ( dir. exists ( )) + list = dir.entryList(); QStringList::Iterator it; for ( it = list.begin(); it != list.end(); ++it ) { TextCodecInterface *iface = 0; QLibrary *lib = new QLibrary( path + "/" + *it ); if ( lib->queryInterface( IID_QtopiaTextCodec, (QUnknownInterface**)&iface ) == QS_OK && iface ) { QValueList<int> mibs = iface->mibEnums(); for (QValueList<int>::ConstIterator i = mibs.begin(); i != mibs.end(); ++i) { (void)iface->createForMib(*i); @@ -229,17 +226,19 @@ bool keep_running : } } } void loadImageCodecs() { QString path = QPEApplication::qpeDir() + "/plugins/imagecodecs"; QDir dir( path, "lib*.so" ); - QStringList list = dir.entryList(); + QStringList list; + if ( dir. exists ( )) + list = dir.entryList(); QStringList::Iterator it; for ( it = list.begin(); it != list.end(); ++it ) { ImageCodecInterface *iface = 0; QLibrary *lib = new QLibrary( path + "/" + *it ); if ( lib->queryInterface( IID_QtopiaImageCodec, (QUnknownInterface**)&iface ) == QS_OK && iface ) { QStringList formats = iface->keys(); for (QStringList::ConstIterator i = formats.begin(); i != formats.end(); ++i) { (void)iface->installIOHandler(*i); |