From 80e6bf1ef5e40033f71c9d5e95893fa285fd4ee3 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 4 Jul 2016 18:54:51 +0200 Subject: [PATCH] QmlProfiler: Terminate waiting processes when Complete arrives Previously, in AppStopRequested state we would wait until we are done processing the data. This is problematic as when aggregating traces this doesn't happen spontaneously. If we've explicitly asked the process to terminate it's safe to do so after receiving Complete as we won't need any more data after this. Change-Id: I64111ce6039ffc7f6815425c6b7e4432ac528c86 Reviewed-by: Joerg Bornemann --- src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp | 2 ++ src/plugins/qmlprofiler/qmlprofilertool.cpp | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp b/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp index 31e72dcaeb7..03d5b10f977 100644 --- a/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp @@ -346,6 +346,8 @@ void QmlProfilerClientManager::retryMessageBoxFinished(int result) void QmlProfilerClientManager::qmlComplete(qint64 maximumTime) { + if (d->profilerState->currentState() == QmlProfilerStateManager::AppStopRequested) + d->profilerState->setCurrentState(QmlProfilerStateManager::Idle); d->modelManager->traceTime()->increaseEndTime(maximumTime); if (d->modelManager && !d->aggregateTraces) d->modelManager->acquiringDone(); diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp index dec45639a00..d11f22e411d 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp @@ -780,8 +780,6 @@ void QmlProfilerTool::profilerDataModelStateChanged() setButtonsEnabled(false); break; case QmlProfilerModelManager::Done : - if (d->m_profilerState->currentState() == QmlProfilerStateManager::AppStopRequested) - d->m_profilerState->setCurrentState(QmlProfilerStateManager::Idle); showSaveOption(); updateTimeDisplay(); d->m_recordButton->setEnabled(true);