QmlProfiler: stop trying to connect when the application quits

Change-Id: I3b33ced218320a19fd4e4e834093c0f3b67a8cba
Task-number: QTCREATORBUG-20499
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Ulf Hermann
2018-05-31 14:11:10 +02:00
parent f1881ac2fc
commit 92530fd05d
3 changed files with 13 additions and 0 deletions

View File

@@ -316,6 +316,13 @@ void QmlProfilerTool::finalizeRunControl(QmlProfilerRunner *runWorker)
d->m_toolBusy = false;
updateRunActions();
disconnect(d->m_stopAction, &QAction::triggered, runControl, &RunControl::initiateStop);
// If we're still trying to connect, stop now.
if (d->m_profilerConnections->isConnecting()) {
showNonmodalWarning(tr("The application finished before a connection could be "
"established. No data was loaded."));
d->m_profilerConnections->disconnectFromServer();
}
};
connect(runControl, &RunControl::stopped, this, handleStop);