From 3436c93861d7941913aca77da9fd138c70295ffb Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 1 Oct 2024 17:11:48 +0200 Subject: [PATCH] PerfProfiler: Use simpler access to reporting channel Change-Id: I867a1566a71d60e554bb10368d99849581fa929f Reviewed-by: Christian Kandeler --- src/plugins/boot2qt/qdbdevicedebugsupport.cpp | 10 ---------- src/plugins/perfprofiler/perfprofilerruncontrol.cpp | 7 ++++--- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/plugins/boot2qt/qdbdevicedebugsupport.cpp b/src/plugins/boot2qt/qdbdevicedebugsupport.cpp index f8c7d07355e..f00f72fb424 100644 --- a/src/plugins/boot2qt/qdbdevicedebugsupport.cpp +++ b/src/plugins/boot2qt/qdbdevicedebugsupport.cpp @@ -202,9 +202,6 @@ class QdbDevicePerfProfilerSupport final : public RunWorker { public: explicit QdbDevicePerfProfilerSupport(RunControl *runControl); - -private: - void start() override; }; QdbDevicePerfProfilerSupport::QdbDevicePerfProfilerSupport(RunControl *runControl) @@ -218,13 +215,6 @@ QdbDevicePerfProfilerSupport::QdbDevicePerfProfilerSupport(RunControl *runContro addStopDependency(profilee); } -void QdbDevicePerfProfilerSupport::start() -{ - QTC_ASSERT(usesPerfChannel(), reportFailure({})); - runControl()->setProperty("PerfConnection", perfChannel()); - reportStarted(); -} - // Factories class QdbRunWorkerFactory final : public RunWorkerFactory diff --git a/src/plugins/perfprofiler/perfprofilerruncontrol.cpp b/src/plugins/perfprofiler/perfprofilerruncontrol.cpp index a0927260c14..aa95756707b 100644 --- a/src/plugins/perfprofiler/perfprofilerruncontrol.cpp +++ b/src/plugins/perfprofiler/perfprofilerruncontrol.cpp @@ -30,7 +30,7 @@ namespace PerfProfiler::Internal { class PerfParserWorker final : public RunWorker { public: - PerfParserWorker(RunControl *runControl) + explicit PerfParserWorker(RunControl *runControl) : RunWorker(runControl) { setId("PerfParser"); @@ -62,8 +62,9 @@ public: { CommandLine cmd{findPerfParser()}; m_reader.addTargetArguments(&cmd, runControl()); - QUrl url = runControl()->property("PerfConnection").toUrl(); - if (url.isValid()) { + if (usesPerfChannel()) { // The channel is only used with qdb currently. + const QUrl url = perfChannel(); + QTC_CHECK(url.isValid()); cmd.addArgs({"--host", url.host(), "--port", QString::number(url.port())}); } appendMessage("PerfParser args: " + cmd.arguments(), NormalMessageFormat);