From d12b99ee2ddb3c8f51a26b06695297c5edf27a0f Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 2 Jun 2016 17:16:34 +0200 Subject: [PATCH] QmlProfiler: Don't send stopped() signals before started() Change-Id: I225c4786b8720e24085175cb1c13c662417fd9d8 Reviewed-by: Christian Kandeler --- src/plugins/qmlprofiler/localqmlprofilerrunner.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp b/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp index ce25f18ce76..9b92d2a6a43 100644 --- a/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp +++ b/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp @@ -106,8 +106,11 @@ void LocalQmlProfilerRunner::start() qPrintable(portOrSocket)); } + // queue this, as the process can already die in the call to start(). + // We want the started() signal to be emitted before the stopped() signal. connect(&m_launcher, &ApplicationLauncher::processExited, - this, &LocalQmlProfilerRunner::spontaneousStop); + this, &LocalQmlProfilerRunner::spontaneousStop, + Qt::QueuedConnection); m_launcher.start(runnable); emit started();