From 2c6be25dcd902cb2289f90ba52b9fc945771f2f7 Mon Sep 17 00:00:00 2001
From: Ulf Hermann <ulf.hermann@qt.io>
Date: Tue, 8 Aug 2017 15:56:18 +0200
Subject: [PATCH] RemoteLinux: Use stop dependencies for QML profiling

Change-Id: I8a4f531928f46c6866c798d79476fdd37875326c
Reviewed-by: hjk <hjk@qt.io>
---
 src/plugins/remotelinux/remotelinuxanalyzesupport.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/plugins/remotelinux/remotelinuxanalyzesupport.cpp b/src/plugins/remotelinux/remotelinuxanalyzesupport.cpp
index 996e4e95279..de1a9efde1c 100644
--- a/src/plugins/remotelinux/remotelinuxanalyzesupport.cpp
+++ b/src/plugins/remotelinux/remotelinuxanalyzesupport.cpp
@@ -60,8 +60,13 @@ RemoteLinuxQmlProfilerSupport::RemoteLinuxQmlProfilerSupport(RunControl *runCont
     m_portsGatherer = new PortsGatherer(runControl);
     addStartDependency(m_portsGatherer);
 
+    // The ports gatherer can safely be stopped once the process is running, even though it has to
+    // be started before.
+    addStopDependency(m_portsGatherer);
+
     m_profiler = runControl->createWorker(runControl->runMode());
     m_profiler->addStartDependency(this);
+    addStopDependency(m_profiler);
 }
 
 void RemoteLinuxQmlProfilerSupport::start()
-- 
GitLab