aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprofiler/qmlprofilertool.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2018-05-31 14:11:10 +0200
committerUlf Hermann <ulf.hermann@qt.io>2018-06-04 08:28:18 +0000
commit92530fd05dfe596810e90b499d399f1859bdfd56 (patch)
tree67ed226c0fd3574fcba35bb64e4d5b8361c24325 /src/plugins/qmlprofiler/qmlprofilertool.cpp
parentf1881ac2fc2671be4ce11c381abfcea852feb8e7 (diff)
QmlProfiler: stop trying to connect when the application quits
Change-Id: I3b33ced218320a19fd4e4e834093c0f3b67a8cba Task-number: QTCREATORBUG-20499 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilertool.cpp')
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertool.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp
index 5b44948d32e..dd8605a2d2c 100644
--- a/src/plugins/qmlprofiler/qmlprofilertool.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp
@@ -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);