diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-04-09 13:07:10 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-04-24 07:33:06 +0000 |
commit | c70f59075d416a88f43b193190ad1fa2f81aa0cc (patch) | |
tree | 4005a49c074573f4123d441023a6579fcc28a7f6 | |
parent | 7e0c17eb3797977cdb6debddcbec43704d1fb7fc (diff) |
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>
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofilertool.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp index 2e48a9882b..628ef5e517 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp @@ -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(); } } } |