From cc3a57861d5ef6e84cef0adfa1aaf726dd2b9d84 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 13 Jul 2015 15:56:25 +0200 Subject: 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 --- tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/qml/debugger/qqmldebugservice') diff --git a/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp b/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp index 6ae59078f6..b63c5c0a6d 100644 --- a/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp +++ b/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp @@ -178,7 +178,7 @@ void tst_QQmlDebugService::sendMessage() QTest::ignoreMessage(QtWarningMsg, "QQmlDebugService: Conflicting plugin name \"tst_QQmlDebugService\""); QQmlDebugTestService duplicate("tst_QQmlDebugService"); - duplicate.sendMessage("msg"); + emit duplicate.messageToClient(duplicate.name(), "msg"); QTest::ignoreMessage(QtWarningMsg, "QQmlDebugService: Plugin \"tst_QQmlDebugService\" is not registered."); } -- cgit v1.2.3