author | zecke <zecke> | 2003-09-30 08:28:21 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-09-30 08:28:21 (UTC) |
commit | 4dd842eacb6c04303932e4cbebedff14db7cbc87 (patch) (unidiff) | |
tree | fce6ebe83d9c3863b1cf9313a264c85014a716dc | |
parent | 5430b226e390cc9af6a3257d6998e34bf806c9e2 (diff) | |
download | opie-4dd842eacb6c04303932e4cbebedff14db7cbc87.zip opie-4dd842eacb6c04303932e4cbebedff14db7cbc87.tar.gz opie-4dd842eacb6c04303932e4cbebedff14db7cbc87.tar.bz2 |
Use a QQueue as in Qtopia
-rw-r--r-- | library/qpeapplication.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index 4d0b0ea..98af70a 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp | |||
@@ -24,2 +24,3 @@ | |||
24 | #include <qfile.h> | 24 | #include <qfile.h> |
25 | #include <qqueue.h> | ||
25 | #ifdef Q_WS_QWS | 26 | #ifdef Q_WS_QWS |
@@ -102,5 +103,3 @@ public: | |||
102 | 103 | ||
103 | { | 104 | {} |
104 | qcopq.setAutoDelete( TRUE ); | ||
105 | } | ||
106 | 105 | ||
@@ -135,3 +134,3 @@ public: | |||
135 | QGuardedPtr<QWidget> lastraised; | 134 | QGuardedPtr<QWidget> lastraised; |
136 | QList<QCopRec> qcopq; | 135 | QQueue<QCopRec> qcopq; |
137 | QString styleName; | 136 | QString styleName; |
@@ -142,3 +141,3 @@ public: | |||
142 | { | 141 | { |
143 | qcopq.append( new QCopRec( ch, msg, data ) ); | 142 | qcopq.enqueue( new QCopRec( ch, msg, data ) ); |
144 | } | 143 | } |
@@ -151,4 +150,6 @@ public: | |||
151 | #ifndef QT_NO_COP | 150 | #ifndef QT_NO_COP |
152 | 151 | while((r=qcopq.dequeue())) { | |
153 | for ( QListIterator<QCopRec> it( qcopq ); ( r = it.current() ); ++it ) | 152 | // remove from queue before sending... |
153 | // event loop can come around again before getting | ||
154 | // back from sendLocally | ||
154 | QCopChannel::sendLocally( r->channel, r->message, r->data ); | 155 | QCopChannel::sendLocally( r->channel, r->message, r->data ); |
@@ -156,3 +157,4 @@ public: | |||
156 | 157 | ||
157 | qcopq.clear(); | 158 | delete r; |
159 | } | ||
158 | } | 160 | } |