diff options
Diffstat (limited to 'src/declarative/debugger/qdeclarativedebugserver.cpp')
-rw-r--r-- | src/declarative/debugger/qdeclarativedebugserver.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/declarative/debugger/qdeclarativedebugserver.cpp b/src/declarative/debugger/qdeclarativedebugserver.cpp index 12691b2..3e0c326 100644 --- a/src/declarative/debugger/qdeclarativedebugserver.cpp +++ b/src/declarative/debugger/qdeclarativedebugserver.cpp @@ -91,6 +91,7 @@ public: QStringList clientPlugins; bool gotHello; QString waitingForMsgFromService; + bool waitingForMsgSucceeded; private: // private slot @@ -100,7 +101,8 @@ private: QDeclarativeDebugServerPrivate::QDeclarativeDebugServerPrivate() : connection(0), - gotHello(false) + gotHello(false), + waitingForMsgSucceeded(false) { } @@ -315,7 +317,7 @@ void QDeclarativeDebugServer::receiveMessage(const QByteArray &message) if (d->waitingForMsgFromService == name) { // deliver directly so that it is delivered before waitForMessage is returning. d->_q_deliverMessage(name, message); - d->waitingForMsgFromService.clear(); + d->waitingForMsgSucceeded = true; } else { // deliver message in next event loop run. // Fixes the case that the service does start it's own event loop ..., @@ -409,7 +411,9 @@ bool QDeclarativeDebugServer::waitForMessage(QDeclarativeDebugService *service) do { d->connection->waitForMessage(); - } while (!d->waitingForMsgFromService.isEmpty()); + } while (!d->waitingForMsgSucceeded); + d->waitingForMsgSucceeded = false; + d->waitingForMsgFromService.clear(); return true; } |