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 <joerg.bornemann@qt.io>
This commit is contained in:
Ulf Hermann
2016-07-04 18:54:51 +02:00
parent 51055e6799
commit 80e6bf1ef5
2 changed files with 2 additions and 2 deletions

View File

@@ -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();

View File

@@ -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);