author | zecke <zecke> | 2003-10-02 19:50:57 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-10-02 19:50:57 (UTC) |
commit | a5622a23c3083e1ff8a526713aed6a36aaf7a5bd (patch) (unidiff) | |
tree | a11dd920c777ebceee2026e573d4e0111875174c /library | |
parent | b262f4cbe41c144c472f17996a8739952464e00c (diff) | |
download | opie-a5622a23c3083e1ff8a526713aed6a36aaf7a5bd.zip opie-a5622a23c3083e1ff8a526713aed6a36aaf7a5bd.tar.gz opie-a5622a23c3083e1ff8a526713aed6a36aaf7a5bd.tar.bz2 |
Move the #ifdef so that the code actually compiles if the expression
is not true
-rw-r--r-- | library/qpeapplication.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index 98af70a..0e469ae 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp | |||
@@ -118,69 +118,70 @@ public: | |||
118 | 118 | ||
119 | 119 | ||
120 | QStringList langs; | 120 | QStringList langs; |
121 | QString appName; | 121 | QString appName; |
122 | struct QCopRec | 122 | struct QCopRec |
123 | { | 123 | { |
124 | QCopRec( const QCString &ch, const QCString &msg, | 124 | QCopRec( const QCString &ch, const QCString &msg, |
125 | const QByteArray &d ) : | 125 | const QByteArray &d ) : |
126 | channel( ch ), message( msg ), data( d ) | 126 | channel( ch ), message( msg ), data( d ) |
127 | { } | 127 | { } |
128 | 128 | ||
129 | QCString channel; | 129 | QCString channel; |
130 | QCString message; | 130 | QCString message; |
131 | QByteArray data; | 131 | QByteArray data; |
132 | }; | 132 | }; |
133 | QWidget* qpe_main_widget; | 133 | QWidget* qpe_main_widget; |
134 | QGuardedPtr<QWidget> lastraised; | 134 | QGuardedPtr<QWidget> lastraised; |
135 | QQueue<QCopRec> qcopq; | 135 | QQueue<QCopRec> qcopq; |
136 | QString styleName; | 136 | QString styleName; |
137 | QString decorationName; | 137 | QString decorationName; |
138 | 138 | ||
139 | void enqueueQCop( const QCString &ch, const QCString &msg, | 139 | void enqueueQCop( const QCString &ch, const QCString &msg, |
140 | const QByteArray &data ) | 140 | const QByteArray &data ) |
141 | { | 141 | { |
142 | qcopq.enqueue( new QCopRec( ch, msg, data ) ); | 142 | qcopq.enqueue( new QCopRec( ch, msg, data ) ); |
143 | } | 143 | } |
144 | void sendQCopQ() | 144 | void sendQCopQ() |
145 | { | 145 | { |
146 | if (!qcopQok ) | 146 | if (!qcopQok ) |
147 | return; | 147 | return; |
148 | 148 | ||
149 | QCopRec * r; | 149 | QCopRec * r; |
150 | #ifndef QT_NO_COP | 150 | |
151 | while((r=qcopq.dequeue())) { | 151 | while((r=qcopq.dequeue())) { |
152 | // remove from queue before sending... | 152 | // remove from queue before sending... |
153 | // event loop can come around again before getting | 153 | // event loop can come around again before getting |
154 | // back from sendLocally | 154 | // back from sendLocally |
155 | #ifndef QT_NO_COP | ||
155 | QCopChannel::sendLocally( r->channel, r->message, r->data ); | 156 | QCopChannel::sendLocally( r->channel, r->message, r->data ); |
156 | #endif | 157 | #endif |
157 | 158 | ||
158 | delete r; | 159 | delete r; |
159 | } | 160 | } |
160 | } | 161 | } |
161 | static void show_mx(QWidget* mw, bool nomaximize, const QString & = QString::null ) | 162 | static void show_mx(QWidget* mw, bool nomaximize, const QString & = QString::null ) |
162 | { | 163 | { |
163 | 164 | ||
164 | // ugly hack, remove that later after finding a sane solution | 165 | // ugly hack, remove that later after finding a sane solution |
165 | // Addendum: Only Sharp currently has models with high resolution but (physically) small displays, | 166 | // Addendum: Only Sharp currently has models with high resolution but (physically) small displays, |
166 | // so this is only useful if QT_QWS_SIMPAD is NOT defined. E.g. SIMpad has 800x600 but has | 167 | // so this is only useful if QT_QWS_SIMPAD is NOT defined. E.g. SIMpad has 800x600 but has |
167 | // a (physically) large enough display to use the small icons | 168 | // a (physically) large enough display to use the small icons |
168 | #ifndef QT_QWS_SIMPAD | 169 | #ifndef QT_QWS_SIMPAD |
169 | if ( QPEApplication::desktop() ->width() >= 600 && ( mw->inherits("QMainWindow") || mw->isA("QMainWindow") ) ) { | 170 | if ( QPEApplication::desktop() ->width() >= 600 && ( mw->inherits("QMainWindow") || mw->isA("QMainWindow") ) ) { |
170 | ( ( QMainWindow* ) mw )->setUsesBigPixmaps( true ); | 171 | ( ( QMainWindow* ) mw )->setUsesBigPixmaps( true ); |
171 | } | 172 | } |
172 | #endif | 173 | #endif |
173 | 174 | ||
174 | if ( mw->layout() && mw->inherits("QDialog") ) { | 175 | if ( mw->layout() && mw->inherits("QDialog") ) { |
175 | QPEApplication::showDialog((QDialog*)mw, nomaximize); | 176 | QPEApplication::showDialog((QDialog*)mw, nomaximize); |
176 | } | 177 | } |
177 | else { | 178 | else { |
178 | #ifdef Q_WS_QWS | 179 | #ifdef Q_WS_QWS |
179 | if ( !nomaximize ) | 180 | if ( !nomaximize ) |
180 | mw->showMaximized(); | 181 | mw->showMaximized(); |
181 | else | 182 | else |
182 | #endif | 183 | #endif |
183 | 184 | ||
184 | mw->show(); | 185 | mw->show(); |
185 | } | 186 | } |
186 | } | 187 | } |