diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2018-02-05 14:15:47 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2018-03-20 16:46:04 +0000 |
commit | 895a511245ae3750ac41b352cdc6915c8f8dd110 (patch) | |
tree | d71abb637b89516f61ee7d2613401ae4ccc7a69f /tools/qmlprofiler/qmlprofilerclient.cpp | |
parent | 1b6792d3040e013acfa9fa5e39418d5b6a648f4b (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 'tools/qmlprofiler/qmlprofilerclient.cpp')
-rw-r--r-- | tools/qmlprofiler/qmlprofilerclient.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/qmlprofiler/qmlprofilerclient.cpp b/tools/qmlprofiler/qmlprofilerclient.cpp index b69c7e73e1..f6cc6f39fe 100644 --- a/tools/qmlprofiler/qmlprofilerclient.cpp +++ b/tools/qmlprofiler/qmlprofilerclient.cpp @@ -57,6 +57,8 @@ QmlProfilerClient::QmlProfilerClient(QQmlDebugConnection *connection, QmlProfile { Q_D(QmlProfilerClient); setRequestedFeatures(std::numeric_limits<quint64>::max()); + connect(this, &QQmlDebugClient::stateChanged, + this, &QmlProfilerClient::onStateChanged); connect(this, &QQmlProfilerClient::traceStarted, d->data, &QmlProfilerData::setTraceStartTime); connect(this, &QQmlProfilerClient::traceFinished, @@ -65,7 +67,7 @@ QmlProfilerClient::QmlProfilerClient(QQmlDebugConnection *connection, QmlProfile d->data, &QmlProfilerData::complete); } -void QmlProfilerClient::stateChanged(State state) +void QmlProfilerClient::onStateChanged(State state) { Q_D(QmlProfilerClient); if ((d->enabled && state != Enabled) || (!d->enabled && state == Enabled)) { |