summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--library/qpeapplication.cpp18
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
@@ -23,4 +23,5 @@
#include <linux/limits.h> // needed for some toolchains (PATH_MAX)
#include <qfile.h>
+#include <qqueue.h>
#ifdef Q_WS_QWS
#ifndef QT_NO_COP
@@ -101,7 +102,5 @@ public:
keep_running( true ), qpe_main_widget( 0 ), qcopQok( false )
- {
- qcopq.setAutoDelete( TRUE );
- }
+ {}
int presstimer;
@@ -134,5 +133,5 @@ public:
QWidget* qpe_main_widget;
QGuardedPtr<QWidget> lastraised;
- QList<QCopRec> qcopq;
+ QQueue<QCopRec> qcopq;
QString styleName;
QString decorationName;
@@ -141,5 +140,5 @@ public:
const QByteArray &data )
{
- qcopq.append( new QCopRec( ch, msg, data ) );
+ qcopq.enqueue( new QCopRec( ch, msg, data ) );
}
void sendQCopQ()
@@ -150,10 +149,13 @@ public:
QCopRec * r;
#ifndef QT_NO_COP
-
- for ( QListIterator<QCopRec> it( qcopq ); ( r = it.current() ); ++it )
+ while((r=qcopq.dequeue())) {
+ // remove from queue before sending...
+ // event loop can come around again before getting
+ // back from sendLocally
QCopChannel::sendLocally( r->channel, r->message, r->data );
#endif
- qcopq.clear();
+ delete r;
+ }
}
static void show_mx(QWidget* mw, bool nomaximize, const QString & = QString::null )