ProjectExplorer: Reduce use of Runnable in SimpleTargetRunner

Runnable functionality is nowadays mostly accessed more directly
in QtcProcess and its setup functions.

Change-Id: I2a2b5433aef1d464dc58d5a35069376dee051d57
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
hjk
2022-05-23 16:09:43 +02:00
parent ae42604904
commit f79a71df7b
13 changed files with 123 additions and 110 deletions

View File

@@ -26,11 +26,9 @@
#include "qnxdebugsupport.h"
#include "qnxconstants.h"
#include "qnxdevice.h"
#include "qnxrunconfiguration.h"
#include "slog2inforunner.h"
#include "qnxqtversion.h"
#include "qnxutils.h"
#include <coreplugin/icore.h>
@@ -103,21 +101,21 @@ public:
{
setId("QnxDebuggeeRunner");
setStarter([this, runControl, portsGatherer] {
Runnable r = runControl->runnable();
setStartModifier([this, portsGatherer] {
CommandLine cmd = commandLine();
QStringList arguments;
if (portsGatherer->useGdbServer()) {
int pdebugPort = portsGatherer->gdbServer().port();
r.command.setExecutable(FilePath::fromString(QNX_DEBUG_EXECUTABLE));
cmd.setExecutable(FilePath::fromString(QNX_DEBUG_EXECUTABLE));
arguments.append(QString::number(pdebugPort));
}
if (portsGatherer->useQmlServer()) {
arguments.append(QmlDebug::qmlDebugTcpArguments(QmlDebug::QmlDebuggerServices,
portsGatherer->qmlServer()));
}
r.command.setArguments(ProcessArgs::joinArgs(arguments));
r.device = runControl->device();
doStart(r);
cmd.setArguments(ProcessArgs::joinArgs(arguments));
setCommandLine(cmd);
});
}
};
@@ -197,13 +195,9 @@ public:
setId("PDebugRunner");
addStartDependency(portsGatherer);
setStarter([this, runControl, portsGatherer] {
setStartModifier([this, portsGatherer] {
const int pdebugPort = portsGatherer->gdbServer().port();
Runnable r;
r.command = {QNX_DEBUG_EXECUTABLE, {QString::number(pdebugPort)}};
r.device = runControl->device();
doStart(r);
setCommandLine({QNX_DEBUG_EXECUTABLE, {QString::number(pdebugPort)}});
});
}
};