From 4b57f6ac3d5df7359bf13c03aa82fb52bdf33bce Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 20 Aug 2018 12:01:08 +0200 Subject: [PATCH] QmlProfiler: Don't save the run worker in LocalQmlProfilerSupport We don't need it and will dangle when the RunControl drops its workers. Change-Id: I93e872083a870ad860624509622c5d779e35dfd3 Reviewed-by: hjk --- src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp | 10 +++++----- src/plugins/qmlprofiler/qmlprofilerruncontrol.h | 3 --- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp index 8d10907f9eb..f4d9d7cfa73 100644 --- a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp @@ -231,15 +231,15 @@ LocalQmlProfilerSupport::LocalQmlProfilerSupport(QmlProfilerTool *profilerTool, { setDisplayName("LocalQmlProfilerSupport"); - m_profiler = new QmlProfilerRunner(runControl); - m_profiler->setServerUrl(serverUrl); - connect(m_profiler, &QmlProfilerRunner::starting, + QmlProfilerRunner *profiler = new QmlProfilerRunner(runControl); + profiler->setServerUrl(serverUrl); + connect(profiler, &QmlProfilerRunner::starting, profilerTool, &QmlProfilerTool::finalizeRunControl); - addStopDependency(m_profiler); + addStopDependency(profiler); // 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. - addStartDependency(m_profiler); + addStartDependency(profiler); Runnable debuggee = runnable(); diff --git a/src/plugins/qmlprofiler/qmlprofilerruncontrol.h b/src/plugins/qmlprofiler/qmlprofilerruncontrol.h index c9c9c5b38a5..48bc789414a 100644 --- a/src/plugins/qmlprofiler/qmlprofilerruncontrol.h +++ b/src/plugins/qmlprofiler/qmlprofilerruncontrol.h @@ -75,9 +75,6 @@ public: LocalQmlProfilerSupport(QmlProfilerTool *profilerTool, ProjectExplorer::RunControl *runControl); LocalQmlProfilerSupport(QmlProfilerTool *profilerTool, ProjectExplorer::RunControl *runControl, const QUrl &serverUrl); - -private: - QmlProfilerRunner *m_profiler; }; } // namespace Internal