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