author | sandman <sandman> | 2002-12-10 23:11:22 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-12-10 23:11:22 (UTC) |
commit | 967fa32fa3eb3296f675c9d7af8cce838c6b592b (patch) (unidiff) | |
tree | 334c539769f0f8b5aacdf4ecbaadb21c7b5c6a4e /library | |
parent | 50c0db8b07915b6129d120f21a976cbdd54cccfe (diff) | |
download | opie-967fa32fa3eb3296f675c9d7af8cce838c6b592b.zip opie-967fa32fa3eb3296f675c9d7af8cce838c6b592b.tar.gz opie-967fa32fa3eb3296f675c9d7af8cce838c6b592b.tar.bz2 |
- small code cleanup
- finally we get rid of the "no image/text codecs" message at startup !!!
-rw-r--r-- | library/qpeapplication.cpp | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index b5dff3a..c41dd06 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp | |||
@@ -92,24 +92,27 @@ | |||
92 | class QPEApplicationData | 92 | class QPEApplicationData |
93 | { | 93 | { |
94 | public: | 94 | public: |
95 | QPEApplicationData() : presstimer( 0 ), presswidget( 0 ), rightpressed( FALSE ), | 95 | QPEApplicationData() : presstimer( 0 ), presswidget( 0 ), kbgrabber( 0 ), |
96 | kbgrabber( 0 ), kbregrab( FALSE ), notbusysent( FALSE ), preloaded( FALSE ), | 96 | rightpressed( FALSE ), kbregrab( FALSE ), notbusysent( FALSE ), preloaded( FALSE ), |
97 | forceshow( FALSE ), nomaximize( FALSE ), qpe_main_widget( 0 ), | 97 | forceshow( FALSE ), nomaximize( FALSE ), keep_running( TRUE ), qpe_main_widget( 0 ) |
98 | keep_running( TRUE ) | 98 | |
99 | { | 99 | { |
100 | qcopq.setAutoDelete( TRUE ); | 100 | qcopq.setAutoDelete( TRUE ); |
101 | } | 101 | } |
102 | 102 | ||
103 | int presstimer; | 103 | int presstimer; |
104 | QWidget* presswidget; | 104 | QWidget* presswidget; |
105 | QPoint presspos; | ||
106 | bool rightpressed : | ||
107 | 1; // AEH why not use uint foobar :1; if it's tt style -zecke | ||
108 | int kbgrabber; | 105 | int kbgrabber; |
109 | bool kbregrab : | 106 | QPoint presspos; |
110 | 1; | 107 | |
111 | bool notbusysent : | 108 | bool rightpressed : 1; |
112 | 1; | 109 | bool kbregrab : 1; |
110 | bool notbusysent : 1; | ||
111 | bool preloaded : 1; | ||
112 | bool forceshow : 1; | ||
113 | bool nomaximize : 1; | ||
114 | bool keep_running : 1; | ||
115 | |||
113 | QString appName; | 116 | QString appName; |
114 | struct QCopRec | 117 | struct QCopRec |
115 | { | 118 | { |
@@ -122,17 +125,9 @@ bool notbusysent : | |||
122 | QCString message; | 125 | QCString message; |
123 | QByteArray data; | 126 | QByteArray data; |
124 | }; | 127 | }; |
125 | bool preloaded : | ||
126 | 1; | ||
127 | bool forceshow : | ||
128 | 1; | ||
129 | bool nomaximize : | ||
130 | 1; | ||
131 | QWidget* qpe_main_widget; | 128 | QWidget* qpe_main_widget; |
132 | bool keep_running : | ||
133 | 1; | ||
134 | QList<QCopRec> qcopq; | 129 | QList<QCopRec> qcopq; |
135 | 130 | ||
136 | void enqueueQCop( const QCString &ch, const QCString &msg, | 131 | void enqueueQCop( const QCString &ch, const QCString &msg, |
137 | const QByteArray &data ) | 132 | const QByteArray &data ) |
138 | { | 133 | { |
@@ -211,7 +206,9 @@ bool keep_running : | |||
211 | { | 206 | { |
212 | QString path = QPEApplication::qpeDir() + "/plugins/textcodecs"; | 207 | QString path = QPEApplication::qpeDir() + "/plugins/textcodecs"; |
213 | QDir dir( path, "lib*.so" ); | 208 | QDir dir( path, "lib*.so" ); |
214 | QStringList list = dir.entryList(); | 209 | QStringList list; |
210 | if ( dir. exists ( )) | ||
211 | list = dir.entryList(); | ||
215 | QStringList::Iterator it; | 212 | QStringList::Iterator it; |
216 | for ( it = list.begin(); it != list.end(); ++it ) { | 213 | for ( it = list.begin(); it != list.end(); ++it ) { |
217 | TextCodecInterface *iface = 0; | 214 | TextCodecInterface *iface = 0; |
@@ -234,7 +231,9 @@ bool keep_running : | |||
234 | { | 231 | { |
235 | QString path = QPEApplication::qpeDir() + "/plugins/imagecodecs"; | 232 | QString path = QPEApplication::qpeDir() + "/plugins/imagecodecs"; |
236 | QDir dir( path, "lib*.so" ); | 233 | QDir dir( path, "lib*.so" ); |
237 | QStringList list = dir.entryList(); | 234 | QStringList list; |
235 | if ( dir. exists ( )) | ||
236 | list = dir.entryList(); | ||
238 | QStringList::Iterator it; | 237 | QStringList::Iterator it; |
239 | for ( it = list.begin(); it != list.end(); ++it ) { | 238 | for ( it = list.begin(); it != list.end(); ++it ) { |
240 | ImageCodecInterface *iface = 0; | 239 | ImageCodecInterface *iface = 0; |