diff options
author | Kai Koehne <kai.koehne@nokia.com> | 2012-04-24 14:39:38 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-25 14:26:42 +0200 |
commit | 0d284ae2d62707e6c35c8d97ca73e974d35c4167 (patch) | |
tree | d41e0e0c64486a43c45db2c6a8ad3e1a9fba6ec9 /src/qml/debugger/qqmldebugserver_p.h | |
parent | e1583664fd8a9eb66e37bdd2e1476bbf90383a4c (diff) |
Debugger: Fix race conditions in block mode
Using waitForMessage() in the constructor after registerService() is
_not_ safe: You might get the first message already after the
registerService() and before the waitForMessage() call. Instead,
use QMutex/QWaitCondition to block the initialization. Also make
the use of the block mode explicit, since the service might already
be enabled also for non-blocking modes ...
Change-Id: I387bfe0627c80e2029acff71f86d12cd9ab58de1
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Diffstat (limited to 'src/qml/debugger/qqmldebugserver_p.h')
-rw-r--r-- | src/qml/debugger/qqmldebugserver_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/debugger/qqmldebugserver_p.h b/src/qml/debugger/qqmldebugserver_p.h index 5de7e73706..5e853da2ee 100644 --- a/src/qml/debugger/qqmldebugserver_p.h +++ b/src/qml/debugger/qqmldebugserver_p.h @@ -76,6 +76,7 @@ public: void setConnection(QQmlDebugServerConnection *connection); bool hasDebuggingClient() const; + bool blockingMode() const; QList<QQmlDebugService*> services() const; QStringList serviceNames() const; @@ -86,7 +87,6 @@ public: void receiveMessage(const QByteArray &message); - bool waitForMessage(QQmlDebugService *service); void sendMessages(QQmlDebugService *service, const QList<QByteArray> &messages); private: |