summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2017-08-09 13:45:08 +0200
committerhjk <hjk@qt.io>2017-08-09 12:19:17 +0000
commit6f5c5a56dbef6545dedea1948771000698bcab5d (patch)
tree6ead823f2009f95ca17224e91ae39cfaa3760512
parent4023e56d421e9747e33de03b75fc22a4e02333bc (diff)
downloadqt-creator-6f5c5a56dbef6545dedea1948771000698bcab5d.tar.gz
QmlProfiler: reportStopped() only when entering Idle
Change-Id: I291ff6506a16e294165109a89f2acf22d24d7928 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp
index 4794062325..fff1a52800 100644
--- a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp
@@ -133,10 +133,11 @@ void QmlProfilerRunner::stop()
switch (d->m_profilerState->currentState()) {
case QmlProfilerStateManager::AppRunning:
d->m_profilerState->setCurrentState(QmlProfilerStateManager::AppStopRequested);
- return; // Don't reportStopped() here. We are still waiting for data.
+ break;
case QmlProfilerStateManager::AppStopRequested:
// Pressed "stop" a second time. Kill the application without collecting data
d->m_profilerState->setCurrentState(QmlProfilerStateManager::Idle);
+ reportStopped();
break;
case QmlProfilerStateManager::Idle:
case QmlProfilerStateManager::AppDying:
@@ -149,7 +150,6 @@ void QmlProfilerRunner::stop()
}
break;
}
- reportStopped();
}
void QmlProfilerRunner::notifyRemoteFinished()