forked from qt-creator/qt-creator
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:
@@ -346,6 +346,8 @@ void QmlProfilerClientManager::retryMessageBoxFinished(int result)
|
|||||||
|
|
||||||
void QmlProfilerClientManager::qmlComplete(qint64 maximumTime)
|
void QmlProfilerClientManager::qmlComplete(qint64 maximumTime)
|
||||||
{
|
{
|
||||||
|
if (d->profilerState->currentState() == QmlProfilerStateManager::AppStopRequested)
|
||||||
|
d->profilerState->setCurrentState(QmlProfilerStateManager::Idle);
|
||||||
d->modelManager->traceTime()->increaseEndTime(maximumTime);
|
d->modelManager->traceTime()->increaseEndTime(maximumTime);
|
||||||
if (d->modelManager && !d->aggregateTraces)
|
if (d->modelManager && !d->aggregateTraces)
|
||||||
d->modelManager->acquiringDone();
|
d->modelManager->acquiringDone();
|
||||||
|
@@ -780,8 +780,6 @@ void QmlProfilerTool::profilerDataModelStateChanged()
|
|||||||
setButtonsEnabled(false);
|
setButtonsEnabled(false);
|
||||||
break;
|
break;
|
||||||
case QmlProfilerModelManager::Done :
|
case QmlProfilerModelManager::Done :
|
||||||
if (d->m_profilerState->currentState() == QmlProfilerStateManager::AppStopRequested)
|
|
||||||
d->m_profilerState->setCurrentState(QmlProfilerStateManager::Idle);
|
|
||||||
showSaveOption();
|
showSaveOption();
|
||||||
updateTimeDisplay();
|
updateTimeDisplay();
|
||||||
d->m_recordButton->setEnabled(true);
|
d->m_recordButton->setEnabled(true);
|
||||||
|
Reference in New Issue
Block a user