Make sure that the first message hasn't already arrived before
we call d->messageArrivedCondition.wait().
Change-Id: I0d3df9adbd41f71df5c1c7d6df90c0037f494514
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
qQmlDebugServer->moveToThread(thread);
thread->setPluginName(pluginName);
thread->setPort(port, block, hostAddress);
+
+ QQmlDebugServerPrivate *d = qQmlDebugServer->d_func();
+ QMutexLocker locker(&d->messageArrivedMutex);
thread->start();
- if (block) {
- QQmlDebugServerPrivate *d = qQmlDebugServer->d_func();
- d->messageArrivedMutex.lock();
+ if (block)
d->messageArrivedCondition.wait(&d->messageArrivedMutex);
- d->messageArrivedMutex.unlock();
- }
} else {
qWarning() << QString(QLatin1String(