summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2017-08-09 10:18:46 +0200
committerUlf Hermann <ulf.hermann@qt.io>2017-08-09 08:37:24 +0000
commit88b113c850ea5ada9afb8e2d1801bebc7408f041 (patch)
tree82a640a708a828dcce4f01df85e815c7545dea29
parent96dd315f61225f2c040d0c8e9ce0f0c6312a5a71 (diff)
downloadqt-creator-88b113c850ea5ada9afb8e2d1801bebc7408f041.tar.gz
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 <hjk@qt.io>
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp
index 2dec1be147..4794062325 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<StandardRunnable>();
@@ -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);
}