author | zecke <zecke> | 2003-09-30 08:22:29 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-09-30 08:22:29 (UTC) |
commit | 5430b226e390cc9af6a3257d6998e34bf806c9e2 (patch) (side-by-side diff) | |
tree | 3a1e3ad2087157c5d95574f2b2a5d09ed68f65d5 | |
parent | c638bdc2b6ff6a18ec851f4317629b9d3eed4d7b (diff) | |
download | opie-5430b226e390cc9af6a3257d6998e34bf806c9e2.zip opie-5430b226e390cc9af6a3257d6998e34bf806c9e2.tar.gz opie-5430b226e390cc9af6a3257d6998e34bf806c9e2.tar.bz2 |
Only send local QCOP Requests when you've inserted the event loop because
only at this point they will be delivered right ( slots connected to the
signals )
Needs a backport!!!!
-rw-r--r-- | library/qpeapplication.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index 86aa53d..4d0b0ea 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp @@ -93,34 +93,36 @@ class QPEApplicationData { public: QPEApplicationData ( ) : presstimer( 0 ), presswidget( 0 ), rightpressed( false ), kbgrabbed( false ), notbusysent( false ), preloaded( false ), forceshow( false ), nomaximize( false ), - keep_running( true ), qpe_main_widget( 0 ) + keep_running( true ), qpe_main_widget( 0 ), qcopQok( false ) { qcopq.setAutoDelete( TRUE ); } int presstimer; QWidget* presswidget; QPoint presspos; bool rightpressed : 1; bool kbgrabbed : 1; bool notbusysent : 1; bool preloaded : 1; bool forceshow : 1; bool nomaximize : 1; + bool qcopQok : 1; bool keep_running : 1; + QStringList langs; QString appName; struct QCopRec { QCopRec( const QCString &ch, const QCString &msg, const QByteArray &d ) : channel( ch ), message( msg ), data( d ) { } @@ -137,16 +139,19 @@ public: void enqueueQCop( const QCString &ch, const QCString &msg, const QByteArray &data ) { qcopq.append( new QCopRec( ch, msg, data ) ); } void sendQCopQ() { + if (!qcopQok ) + return; + QCopRec * r; #ifndef QT_NO_COP for ( QListIterator<QCopRec> it( qcopq ); ( r = it.current() ); ++it ) QCopChannel::sendLocally( r->channel, r->message, r->data ); #endif qcopq.clear(); @@ -1888,16 +1893,17 @@ void QPEApplication::grabKeyboard() ((QPEApplication *) qApp )-> d-> kbgrabbed = true; } /*! \reimp */ int QPEApplication::exec() { + d->qcopQok = true; #ifndef QT_NO_COP d->sendQCopQ(); #endif if ( d->keep_running ) //|| d->qpe_main_widget && d->qpe_main_widget->isVisible() ) return QApplication::exec(); |