aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/debugger/qqmldebugjs
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2018-02-05 14:15:47 +0100
committerUlf Hermann <ulf.hermann@qt.io>2018-03-20 16:46:04 +0000
commit895a511245ae3750ac41b352cdc6915c8f8dd110 (patch)
treed71abb637b89516f61ee7d2613401ae4ccc7a69f /tests/auto/qml/debugger/qqmldebugjs
parent1b6792d3040e013acfa9fa5e39418d5b6a648f4b (diff)
QQmlDebugClient: Make stateChanged a signal
This way we can observe it from the outside and drop all the code that genrated extra signals from the virtual method. Also drop the unused QQmlDebugTestService::stateHasChanged signal to reduce the confusion. Change-Id: Ia37c1eaf8b392e594b0931694f43f84fe09b000c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/qml/debugger/qqmldebugjs')
-rw-r--r--tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs/tst_qqmldebugjs.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs/tst_qqmldebugjs.cpp b/tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs/tst_qqmldebugjs.cpp
index 3cd359cf48..37d4ef1160 100644
--- a/tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs/tst_qqmldebugjs.cpp
+++ b/tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs/tst_qqmldebugjs.cpp
@@ -251,6 +251,8 @@ public:
{
parser = jsEngine.evaluate(QLatin1String("JSON.parse"));
stringify = jsEngine.evaluate(QLatin1String("JSON.stringify"));
+ QObject::connect(this, &QQmlDebugClient::stateChanged,
+ this, &QJSDebugClient::onStateChanged);
}
void connect(bool redundantRefs = false, bool namesAsObjects = false);
@@ -272,7 +274,7 @@ public:
protected:
//inherited from QQmlDebugClient
- void stateChanged(State state);
+ void onStateChanged(State state);
void messageReceived(const QByteArray &data);
signals:
@@ -660,7 +662,7 @@ void QJSDebugClient::disconnect()
sendMessage(packMessage(DISCONNECT, json.toString().toUtf8()));
}
-void QJSDebugClient::stateChanged(State state)
+void QJSDebugClient::onStateChanged(State state)
{
if (state == Enabled)
flushSendBuffer();