aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/debugger/qqmlprofilerservice.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2015-07-13 15:56:25 +0200
committerUlf Hermann <ulf.hermann@theqtcompany.com>2015-07-31 06:44:13 +0000
commitcc3a57861d5ef6e84cef0adfa1aaf726dd2b9d84 (patch)
treeef5c3983cda85022afd077fe05a2cb850aa0274b /src/qml/debugger/qqmlprofilerservice.cpp
parent4d07a6254cac5742ffc23377b97c6eaf04aa4c49 (diff)
Use signal/slot for passing messages through QQmlDebugServer
This results in much cleaner code than the previous implementation using QMetaObject::invokeMethod(). We have to use read locks now for adding and removing engines, as we should have done already before. If a condition is waiting on a write lock you cannot acquire a read lock from another thread. So, if we kept the write locks we wouldn't be able to receive messages while the engines are waiting. Change-Id: Icfe641601dec2f8d7181ae579146ed603d57a4c2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/debugger/qqmlprofilerservice.cpp')
-rw-r--r--src/qml/debugger/qqmlprofilerservice.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/debugger/qqmlprofilerservice.cpp b/src/qml/debugger/qqmlprofilerservice.cpp
index e48771090e..62eae0ddd8 100644
--- a/src/qml/debugger/qqmlprofilerservice.cpp
+++ b/src/qml/debugger/qqmlprofilerservice.cpp
@@ -245,7 +245,7 @@ void QQmlProfilerService::startProfiling(QQmlEngine *engine, quint64 features)
}
}
- QQmlDebugService::sendMessage(message);
+ emit messageToClient(name(), message);
}
/*!
@@ -334,7 +334,7 @@ void QQmlProfilerService::sendMessages()
ds << (qint64)-1 << (int)Complete;
messages << data;
- QQmlDebugService::sendMessages(messages);
+ emit messagesToClient(name(), messages);
}
void QQmlProfilerService::stateAboutToBeChanged(QQmlDebugService::State newState)