aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorJarek Kobus <[email protected]>2025-01-09 09:24:04 +0100
committerJarek Kobus <[email protected]>2025-01-10 07:56:59 +0000
commit4f271f497aa9d27e0c30c022f9a7a0336b762b75 (patch)
treea4d67f156fb2658a488312cb6447b6a0e0bd90f4 /src/plugins
parent3dbf65e449e25f3e4bc3c41c5e74e4efd4859c73 (diff)
RunWorker: Remove RunWorker's perf channel getters
Get rid of perfChannel() / usesPerfChannel() indirections. This is RunControl's responsibility, so use the corresponding methods of run control directly. Change-Id: Ic1edfc5221bcf9764e732d1337ab7f43d46cc594 Reviewed-by: hjk <[email protected]>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/boot2qt/qdbdevicedebugsupport.cpp4
-rw-r--r--src/plugins/perfprofiler/perfprofilerruncontrol.cpp4
-rw-r--r--src/plugins/projectexplorer/runcontrol.cpp10
-rw-r--r--src/plugins/projectexplorer/runcontrol.h3
-rw-r--r--src/plugins/qtapplicationmanager/appmanagerruncontrol.cpp2
5 files changed, 5 insertions, 18 deletions
diff --git a/src/plugins/boot2qt/qdbdevicedebugsupport.cpp b/src/plugins/boot2qt/qdbdevicedebugsupport.cpp
index 8a19ef8e45c..82a7a9dd4ea 100644
--- a/src/plugins/boot2qt/qdbdevicedebugsupport.cpp
+++ b/src/plugins/boot2qt/qdbdevicedebugsupport.cpp
@@ -56,7 +56,7 @@ static RunWorker *createQdbDeviceInferiorWorker(RunControl *runControl,
return;
}
}
- if (worker->usesPerfChannel()) {
+ if (runControl->usesPerfChannel()) {
const Store perfArgs = runControl->settingsData(PerfProfiler::Constants::PerfSettingsId);
// appcontroller is not very clear about this, but it expects a comma-separated list of arguments.
// Any literal commas that apper in the args should be escaped by additional commas.
@@ -70,7 +70,7 @@ static RunWorker *createQdbDeviceInferiorWorker(RunControl *runControl,
.join(',');
cmd.addArg("--profile-perf");
cmd.addArgs(recordArgs, CommandLine::Raw);
- lowerPort = upperPort = worker->perfChannel().port();
+ lowerPort = upperPort = runControl->perfChannel().port();
}
cmd.addArg("--port-range");
diff --git a/src/plugins/perfprofiler/perfprofilerruncontrol.cpp b/src/plugins/perfprofiler/perfprofilerruncontrol.cpp
index e55ee6afea2..2c4ea9c8aee 100644
--- a/src/plugins/perfprofiler/perfprofilerruncontrol.cpp
+++ b/src/plugins/perfprofiler/perfprofilerruncontrol.cpp
@@ -64,8 +64,8 @@ public:
{
CommandLine cmd{findPerfParser()};
m_reader.addTargetArguments(&cmd, runControl());
- if (usesPerfChannel()) { // The channel is only used with qdb currently.
- const QUrl url = perfChannel();
+ if (runControl()->usesPerfChannel()) { // The channel is only used with qdb currently.
+ const QUrl url = runControl()->perfChannel();
QTC_CHECK(url.isValid());
cmd.addArgs({"--host", url.host(), "--port", QString::number(url.port())});
}
diff --git a/src/plugins/projectexplorer/runcontrol.cpp b/src/plugins/projectexplorer/runcontrol.cpp
index a133f6f79e0..141c16e7666 100644
--- a/src/plugins/projectexplorer/runcontrol.cpp
+++ b/src/plugins/projectexplorer/runcontrol.cpp
@@ -1975,16 +1975,6 @@ bool RunWorker::usesQmlChannel() const
return d->runControl->usesQmlChannel();
}
-QUrl RunWorker::perfChannel() const
-{
- return d->runControl->perfChannel();
-}
-
-bool RunWorker::usesPerfChannel() const
-{
- return d->runControl->usesPerfChannel();
-}
-
void RunWorker::start()
{
reportStarted();
diff --git a/src/plugins/projectexplorer/runcontrol.h b/src/plugins/projectexplorer/runcontrol.h
index 17c6ddafe7e..16fb79c8b4c 100644
--- a/src/plugins/projectexplorer/runcontrol.h
+++ b/src/plugins/projectexplorer/runcontrol.h
@@ -84,9 +84,6 @@ public:
QUrl qmlChannel() const;
bool usesQmlChannel() const;
- QUrl perfChannel() const;
- bool usesPerfChannel() const;
-
signals:
void started();
void stopped();
diff --git a/src/plugins/qtapplicationmanager/appmanagerruncontrol.cpp b/src/plugins/qtapplicationmanager/appmanagerruncontrol.cpp
index 0e147da613c..fa865663459 100644
--- a/src/plugins/qtapplicationmanager/appmanagerruncontrol.cpp
+++ b/src/plugins/qtapplicationmanager/appmanagerruncontrol.cpp
@@ -76,7 +76,7 @@ static RunWorker *createInferiorRunner(RunControl *runControl, QmlDebugServicesP
}
cmd.addArg(debugArgs.join(' '));
}
- if (worker->usesPerfChannel()) {
+ if (runControl->usesPerfChannel()) {
const Store perfArgs = runControl->settingsData(PerfProfiler::Constants::PerfSettingsId);
const QString recordArgs = perfArgs[PerfProfiler::Constants::PerfRecordArgsId].toString();
cmd.addArg(QString("perf record %1 -o - --").arg(recordArgs));