aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/debugger/qv8profilerservice.cpp
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2012-03-16 16:44:24 +0100
committerQt by Nokia <qt-info@nokia.com>2012-04-24 15:58:25 +0200
commit05e57b7736f8c370476e197fc9d4f77f2cb01605 (patch)
tree5198341ca5e694ecada4e176eb44915684920517 /src/qml/debugger/qv8profilerservice.cpp
parentbacc47f5a42f7da05ead35c4c4f2adf427ced786 (diff)
Debugger: Make sure stateChanged is called from debugger thread
Make sure stateAboutToBeChanged(), stateChanged() is always called from the debugger thread. This matches how messageReceived() is called. On exit, run an event loop until all stateAboutToBeChanged calls have returned. Change-Id: I9cd6199cc80552ad97e4b7d504ea91aa116a6a34 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
Diffstat (limited to 'src/qml/debugger/qv8profilerservice.cpp')
-rw-r--r--src/qml/debugger/qv8profilerservice.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/qml/debugger/qv8profilerservice.cpp b/src/qml/debugger/qv8profilerservice.cpp
index c75c258785..1cd7606416 100644
--- a/src/qml/debugger/qv8profilerservice.cpp
+++ b/src/qml/debugger/qv8profilerservice.cpp
@@ -134,9 +134,11 @@ void QV8ProfilerService::stateAboutToBeChanged(QQmlDebugService::State newState)
return;
if (state() == Enabled) {
- foreach (const QString &title, d->m_ongoing)
- QMetaObject::invokeMethod(this, "stopProfiling", Qt::QueuedConnection, Q_ARG(QString, title));
- sendProfilingData();
+ foreach (const QString &title, d->m_ongoing) {
+ QMetaObject::invokeMethod(this, "stopProfiling", Qt::BlockingQueuedConnection,
+ Q_ARG(QString, title));
+ }
+ QMetaObject::invokeMethod(this, "sendProfilingData", Qt::BlockingQueuedConnection);
}
}