forked from qt-creator/qt-creator
QmlProfiler: If disconnected while serverRecording, show warning
... unless we actually triggered AppStopRequested. Furthermore, don't clear the data in that case. The incomplete data could still be of some value, and we call finalize() later on, which would otherwise confuse the trace manager. Fixes: QTCREATORBUG-22187 Change-Id: Ic4373201d6e9f29583186708a7acb6ba2ddcd502 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -687,11 +687,9 @@ void QmlProfilerTool::clientsDisconnected()
|
||||
d->m_profilerModelManager->finalize();
|
||||
} else if (d->m_profilerState->serverRecording()) {
|
||||
// If the application stopped by itself, check if we have all the data
|
||||
if (d->m_profilerState->currentState() == QmlProfilerStateManager::AppDying ||
|
||||
d->m_profilerState->currentState() == QmlProfilerStateManager::Idle) {
|
||||
if (d->m_profilerState->currentState() != QmlProfilerStateManager::AppStopRequested) {
|
||||
showNonmodalWarning(tr("Application finished before loading profiled data.\n"
|
||||
"Please use the stop button instead."));
|
||||
d->m_profilerModelManager->clearAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user