summaryrefslogtreecommitdiff
path: root/library
Unidiff
Diffstat (limited to 'library') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index 4d0b0ea..98af70a 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -22,6 +22,7 @@
22#include <unistd.h> 22#include <unistd.h>
23#include <linux/limits.h> // needed for some toolchains (PATH_MAX) 23#include <linux/limits.h> // needed for some toolchains (PATH_MAX)
24#include <qfile.h> 24#include <qfile.h>
25#include <qqueue.h>
25#ifdef Q_WS_QWS 26#ifdef Q_WS_QWS
26#ifndef QT_NO_COP 27#ifndef QT_NO_COP
27#if QT_VERSION <= 231 28#if QT_VERSION <= 231
@@ -100,9 +101,7 @@ public:
100 notbusysent( false ), preloaded( false ), forceshow( false ), nomaximize( false ), 101 notbusysent( false ), preloaded( false ), forceshow( false ), nomaximize( false ),
101 keep_running( true ), qpe_main_widget( 0 ), qcopQok( false ) 102 keep_running( true ), qpe_main_widget( 0 ), qcopQok( false )
102 103
103 { 104 {}
104 qcopq.setAutoDelete( TRUE );
105 }
106 105
107 int presstimer; 106 int presstimer;
108 QWidget* presswidget; 107 QWidget* presswidget;
@@ -133,14 +132,14 @@ public:
133 }; 132 };
134 QWidget* qpe_main_widget; 133 QWidget* qpe_main_widget;
135 QGuardedPtr<QWidget> lastraised; 134 QGuardedPtr<QWidget> lastraised;
136 QList<QCopRec> qcopq; 135 QQueue<QCopRec> qcopq;
137 QString styleName; 136 QString styleName;
138 QString decorationName; 137 QString decorationName;
139 138
140 void enqueueQCop( const QCString &ch, const QCString &msg, 139 void enqueueQCop( const QCString &ch, const QCString &msg,
141 const QByteArray &data ) 140 const QByteArray &data )
142 { 141 {
143 qcopq.append( new QCopRec( ch, msg, data ) ); 142 qcopq.enqueue( new QCopRec( ch, msg, data ) );
144 } 143 }
145 void sendQCopQ() 144 void sendQCopQ()
146 { 145 {
@@ -149,12 +148,15 @@ public:
149 148
150 QCopRec * r; 149 QCopRec * r;
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...
154 QCopChannel::sendLocally( r->channel, r->message, r->data ); 153 // event loop can come around again before getting
154 // back from sendLocally
155 QCopChannel::sendLocally( r->channel, r->message, r->data );
155#endif 156#endif
156 157
157 qcopq.clear(); 158 delete r;
159 }
158 } 160 }
159 static void show_mx(QWidget* mw, bool nomaximize, const QString & = QString::null ) 161 static void show_mx(QWidget* mw, bool nomaximize, const QString & = QString::null )
160 { 162 {