PerfProfiler: Use simpler access to reporting channel

Change-Id: I867a1566a71d60e554bb10368d99849581fa929f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2024-10-01 17:11:48 +02:00
parent 1e4d8ff6ce
commit 3436c93861
2 changed files with 4 additions and 13 deletions

View File

@@ -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

View File

@@ -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);