From 88b113c850ea5ada9afb8e2d1801bebc7408f041 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Wed, 9 Aug 2017 10:18:46 +0200 Subject: [PATCH] QmlProfiler: Reverse start dependencies for LocalQmlProfilerSupport We need to start the local server before the application, as the application has to connect to it. If we use a TCP connection, we will retry. So it doesn't hurt to start it before the application, either. Change-Id: I64c24f922040d0ac58fe4f05abffef9ec24e3e9a Reviewed-by: hjk --- src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp index 2dec1be1475..47940623251 100644 --- a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp @@ -309,7 +309,6 @@ LocalQmlProfilerSupport::LocalQmlProfilerSupport(RunControl *runControl, const Q m_profiler = new QmlProfilerRunner(runControl); m_profiler->setServerUrl(serverUrl); - m_profiler->addStartDependency(this); addStopDependency(m_profiler); StandardRunnable debuggee = runnable().as(); @@ -324,6 +323,11 @@ LocalQmlProfilerSupport::LocalQmlProfilerSupport(RunControl *runControl, const Q m_profilee = new SimpleTargetRunner(runControl); m_profilee->setRunnable(debuggee); addStartDependency(m_profilee); + + // We need to open the local server before the application tries to connect. + // In the TCP case, it doesn't hurt either to start the profiler before. + m_profilee->addStartDependency(m_profiler); + m_profilee->addStopDependency(this); }