aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/boot2qt
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2021-08-10 09:19:30 +0200
committerhjk <hjk@qt.io>2021-08-13 15:04:30 +0000
commit52e5023bcce391f7bd47b70e62c3f4ab04d319f7 (patch)
tree6288d6e7e901b6f2c8e3ef29e1cd1fe1f85be4f2 /src/plugins/boot2qt
parent33108795d6b2dd1e91942efb3c1c27ad23342295 (diff)
ProjectExplorer: Use Utils::CommandLine in ProjectExplorer::Runnable
Change-Id: Id965f1f9047dcbc3ea5c9ddaa550d12668cf8ae6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/boot2qt')
-rw-r--r--src/plugins/boot2qt/qdbdevice.cpp5
-rw-r--r--src/plugins/boot2qt/qdbdevicedebugsupport.cpp9
-rw-r--r--src/plugins/boot2qt/qdbplugin.cpp5
-rw-r--r--src/plugins/boot2qt/qdbstopapplicationservice.cpp3
4 files changed, 11 insertions, 11 deletions
diff --git a/src/plugins/boot2qt/qdbdevice.cpp b/src/plugins/boot2qt/qdbdevice.cpp
index 02b262f8c52..1f6ba72280f 100644
--- a/src/plugins/boot2qt/qdbdevice.cpp
+++ b/src/plugins/boot2qt/qdbdevice.cpp
@@ -65,8 +65,7 @@ public:
void terminate() override
{
ProjectExplorer::Runnable r;
- r.executable = FilePath::fromString(Constants::AppcontrollerFilepath);
- r.commandLineArguments = QStringLiteral("--stop");
+ r.command = {QString(Constants::AppcontrollerFilepath), {"--stop"}};
(new ApplicationLauncher(this))->start(r, device());
}
@@ -91,7 +90,7 @@ public:
m_deviceName = device->displayName();
Runnable r;
- r.setCommandLine(command);
+ r.command = command;
m_appRunner.start(r, device);
showMessage(QdbDevice::tr("Starting command \"%1\" on device \"%2\".")
.arg(command.toUserOutput(), m_deviceName));
diff --git a/src/plugins/boot2qt/qdbdevicedebugsupport.cpp b/src/plugins/boot2qt/qdbdevicedebugsupport.cpp
index ef766006c66..04e5132ee46 100644
--- a/src/plugins/boot2qt/qdbdevicedebugsupport.cpp
+++ b/src/plugins/boot2qt/qdbdevicedebugsupport.cpp
@@ -115,12 +115,13 @@ public:
lowerPort = upperPort = perfPort;
}
args.append(QString(" --port-range %1-%2 ").arg(lowerPort).arg(upperPort));
- args.append(r.executable.toString());
+ // FIXME: Breaks with spaces!
+ args.append(r.command.executable().toString());
args.append(" ");
- args.append(r.commandLineArguments);
+ args.append(r.command.arguments());
- r.commandLineArguments = args;
- r.executable = FilePath::fromString(Constants::AppcontrollerFilepath);
+ r.command.setArguments(args);
+ r.command.setExecutable(FilePath::fromString(Constants::AppcontrollerFilepath));
m_launcher.start(r, device());
}
diff --git a/src/plugins/boot2qt/qdbplugin.cpp b/src/plugins/boot2qt/qdbplugin.cpp
index 449b7a8db2e..37bd47e9c46 100644
--- a/src/plugins/boot2qt/qdbplugin.cpp
+++ b/src/plugins/boot2qt/qdbplugin.cpp
@@ -144,8 +144,9 @@ public:
{
setStarter([this, runControl] {
Runnable r = runControl->runnable();
- r.commandLineArguments = r.executable.toString() + ' ' + r.commandLineArguments;
- r.executable = Utils::FilePath::fromString(Constants::AppcontrollerFilepath);
+ // FIXME: Spaces!
+ r.command.setArguments(r.command.executable().toString() + ' ' + r.command.arguments());
+ r.command.setExecutable(Utils::FilePath::fromString(Constants::AppcontrollerFilepath));
doStart(r, runControl->device());
});
}
diff --git a/src/plugins/boot2qt/qdbstopapplicationservice.cpp b/src/plugins/boot2qt/qdbstopapplicationservice.cpp
index d300ef08ad4..4c43cc6af6d 100644
--- a/src/plugins/boot2qt/qdbstopapplicationservice.cpp
+++ b/src/plugins/boot2qt/qdbstopapplicationservice.cpp
@@ -102,8 +102,7 @@ void QdbStopApplicationService::doDeploy()
this, &QdbStopApplicationService::stdOutData);
ProjectExplorer::Runnable runnable;
- runnable.executable = Utils::FilePath::fromString(Constants::AppcontrollerFilepath);
- runnable.commandLineArguments = QStringLiteral("--stop");
+ runnable.command = {QString(Constants::AppcontrollerFilepath), {"--stop"}};
runnable.workingDirectory = FilePath::fromString("/usr/bin");
d->applicationLauncher.start(runnable,