PE: Rename SimpleTargetRunner into ProcessRunner

Change-Id: Ie666fe0811aa63c54edf12934c6db4e17b26c252
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2025-01-02 14:18:31 +01:00
parent 638874edfb
commit ab27988186
22 changed files with 74 additions and 80 deletions

View File

@@ -172,7 +172,7 @@ RunWorker *GdbServerProvider::targetRunner(RunControl *runControl) const
// Command arguments are in host OS style as the bare metal's GDB servers are launched // Command arguments are in host OS style as the bare metal's GDB servers are launched
// on the host, not on that target. // on the host, not on that target.
auto worker = new SimpleTargetRunner(runControl); auto worker = new ProcessRunner(runControl);
worker->setId("BareMetalGdbServer"); worker->setId("BareMetalGdbServer");
// Baremetal's GDB servers are launched on the host, not on the target. // Baremetal's GDB servers are launched on the host, not on the target.
worker->setStartModifier([worker, cmd = command()] { worker->setStartModifier([worker, cmd = command()] {

View File

@@ -204,7 +204,7 @@ bool UvscServerProvider::aboutToRun(DebuggerRunTool *runTool, QString &errorMess
ProjectExplorer::RunWorker *UvscServerProvider::targetRunner(RunControl *runControl) const ProjectExplorer::RunWorker *UvscServerProvider::targetRunner(RunControl *runControl) const
{ {
auto worker = new SimpleTargetRunner(runControl); auto worker = new ProcessRunner(runControl);
worker->setId("BareMetalUvscServer"); worker->setId("BareMetalUvscServer");
worker->setCommandLine({DebuggerKitAspect::runnable(runControl->kit()).command.executable(), worker->setCommandLine({DebuggerKitAspect::runnable(runControl->kit()).command.executable(),
{"-j0", QStringLiteral("-s%1").arg(m_channel.port())}}); {"-j0", QStringLiteral("-s%1").arg(m_channel.port())}});

View File

@@ -29,7 +29,7 @@ namespace Qdb::Internal {
static RunWorker *createQdbDeviceInferiorWorker(RunControl *runControl, static RunWorker *createQdbDeviceInferiorWorker(RunControl *runControl,
QmlDebugServicesPreset qmlServices) QmlDebugServicesPreset qmlServices)
{ {
auto worker = new SimpleTargetRunner(runControl); auto worker = new ProcessRunner(runControl);
worker->setId("QdbDeviceInferiorWorker"); worker->setId("QdbDeviceInferiorWorker");
worker->setStartModifier([worker, runControl, qmlServices] { worker->setStartModifier([worker, runControl, qmlServices] {
@@ -90,7 +90,7 @@ public:
QdbRunWorkerFactory() QdbRunWorkerFactory()
{ {
setProducer([](RunControl *runControl) { setProducer([](RunControl *runControl) {
auto worker = new SimpleTargetRunner(runControl); auto worker = new ProcessRunner(runControl);
worker->setStartModifier([worker] { worker->setStartModifier([worker] {
const CommandLine remoteCommand = worker->commandLine(); const CommandLine remoteCommand = worker->commandLine();
const FilePath remoteExe = remoteCommand.executable(); const FilePath remoteExe = remoteCommand.executable();

View File

@@ -91,7 +91,7 @@ public:
void setupHaskellRunSupport() void setupHaskellRunSupport()
{ {
static HaskellRunConfigurationFactory runConfigFactory; static HaskellRunConfigurationFactory runConfigFactory;
static SimpleTargetRunnerFactory runWorkerFactory{{Constants::C_HASKELL_RUNCONFIG_ID}}; static ProcessRunnerFactory runWorkerFactory{{Constants::C_HASKELL_RUNCONFIG_ID}};
static SimpleDebugRunnerFactory debugWorkerFactory{{Constants::C_HASKELL_RUNCONFIG_ID}}; static SimpleDebugRunnerFactory debugWorkerFactory{{Constants::C_HASKELL_RUNCONFIG_ID}};
} }

View File

@@ -84,7 +84,7 @@ McuSupportRunConfigurationFactory::McuSupportRunConfigurationFactory()
FlashRunWorkerFactory::FlashRunWorkerFactory() FlashRunWorkerFactory::FlashRunWorkerFactory()
{ {
setProducer([](RunControl *runControl) { setProducer([](RunControl *runControl) {
auto worker = new SimpleTargetRunner(runControl); auto worker = new ProcessRunner(runControl);
worker->setStartModifier([worker, runControl] { worker->setStartModifier([worker, runControl] {
const Target *target = runControl->target(); const Target *target = runControl->target();
worker->setCommandLine({cmakeFilePath(target), worker->setCommandLine({cmakeFilePath(target),

View File

@@ -97,7 +97,7 @@ void setupMesonRunConfiguration()
void setupMesonRunAndDebugWorkers() void setupMesonRunAndDebugWorkers()
{ {
using namespace Debugger; using namespace Debugger;
static SimpleTargetRunnerFactory theMesonRunWorkerFactory({Constants::MESON_RUNCONFIG_ID}); static ProcessRunnerFactory theMesonRunWorkerFactory({Constants::MESON_RUNCONFIG_ID});
static SimpleDebugRunnerFactory theMesonDebugRunWorkerFactory({Constants::MESON_RUNCONFIG_ID}); static SimpleDebugRunnerFactory theMesonDebugRunWorkerFactory({Constants::MESON_RUNCONFIG_ID});
} }

View File

@@ -49,11 +49,11 @@ public:
NimRunConfigurationFactory nimRunConfigFactory; NimRunConfigurationFactory nimRunConfigFactory;
NimbleRunConfigurationFactory nimbleRunConfigFactory; NimbleRunConfigurationFactory nimbleRunConfigFactory;
NimbleTestConfigurationFactory nimbleTestConfigFactory; NimbleTestConfigurationFactory nimbleTestConfigFactory;
SimpleTargetRunnerFactory nimRunWorkerFactory{{nimRunConfigFactory.runConfigurationId()}}; ProcessRunnerFactory nimRunWorkerFactory{{nimRunConfigFactory.runConfigurationId()}};
SimpleTargetRunnerFactory nimbleRunWorkerFactory{{nimbleRunConfigFactory.runConfigurationId()}}; ProcessRunnerFactory nimbleRunWorkerFactory{{nimbleRunConfigFactory.runConfigurationId()}};
SimpleDebugRunnerFactory nimDebugWorkerFactory{{nimRunConfigFactory.runConfigurationId()}}; SimpleDebugRunnerFactory nimDebugWorkerFactory{{nimRunConfigFactory.runConfigurationId()}};
SimpleDebugRunnerFactory nimbleDebugWorkerFactory{{nimbleRunConfigFactory.runConfigurationId()}}; SimpleDebugRunnerFactory nimbleDebugWorkerFactory{{nimbleRunConfigFactory.runConfigurationId()}};
SimpleTargetRunnerFactory nimbleTestWorkerFactory{{nimbleTestConfigFactory.runConfigurationId()}}; ProcessRunnerFactory nimbleTestWorkerFactory{{nimbleTestConfigFactory.runConfigurationId()}};
NimbleBuildStepFactory nimbleBuildStepFactory; NimbleBuildStepFactory nimbleBuildStepFactory;
NimbleTaskStepFactory nimbleTaskStepFactory; NimbleTaskStepFactory nimbleTaskStepFactory;
NimCompilerBuildStepFactory buildStepFactory; NimCompilerBuildStepFactory buildStepFactory;

View File

@@ -75,7 +75,7 @@ CustomExecutableRunConfigurationFactory::CustomExecutableRunConfigurationFactory
CustomExecutableRunWorkerFactory::CustomExecutableRunWorkerFactory() CustomExecutableRunWorkerFactory::CustomExecutableRunWorkerFactory()
{ {
setProduct<SimpleTargetRunner>(); setProduct<ProcessRunner>();
addSupportedRunMode(Constants::NORMAL_RUN_MODE); addSupportedRunMode(Constants::NORMAL_RUN_MODE);
addSupportedRunConfig(Constants::CUSTOM_EXECUTABLE_RUNCONFIG_ID); addSupportedRunConfig(Constants::CUSTOM_EXECUTABLE_RUNCONFIG_ID);
} }

View File

@@ -3,7 +3,7 @@
#include "desktoprunconfiguration.h" #include "desktoprunconfiguration.h"
#include "buildsystem.h" #include "deploymentdata.h"
#include "projectexplorerconstants.h" #include "projectexplorerconstants.h"
#include "projectexplorertr.h" #include "projectexplorertr.h"
#include "runconfigurationaspects.h" #include "runconfigurationaspects.h"
@@ -237,7 +237,7 @@ void setupDesktopRunConfigurations()
void setupDesktopRunWorker() void setupDesktopRunWorker()
{ {
static SimpleTargetRunnerFactory theDesktopRunWorkerFactory({ static ProcessRunnerFactory theDesktopRunWorkerFactory({
Constants::CMAKE_RUNCONFIG_ID, Constants::CMAKE_RUNCONFIG_ID,
Constants::QBS_RUNCONFIG_ID, Constants::QBS_RUNCONFIG_ID,
Constants::QMAKE_RUNCONFIG_ID Constants::QMAKE_RUNCONFIG_ID

View File

@@ -1366,15 +1366,15 @@ void RunControlPrivate::debugMessage(const QString &msg) const
} }
// SimpleTargetRunnerPrivate // ProcessRunnerPrivate
namespace Internal { namespace Internal {
class SimpleTargetRunnerPrivate : public QObject class ProcessRunnerPrivate : public QObject
{ {
public: public:
explicit SimpleTargetRunnerPrivate(SimpleTargetRunner *parent); explicit ProcessRunnerPrivate(ProcessRunner *parent);
~SimpleTargetRunnerPrivate() override; ~ProcessRunnerPrivate() override;
void start(); void start();
void stop(); void stop();
@@ -1391,7 +1391,7 @@ public:
qint64 privateApplicationPID() const; qint64 privateApplicationPID() const;
bool isRunning() const; bool isRunning() const;
SimpleTargetRunner *q = nullptr; ProcessRunner *q = nullptr;
bool m_runAsRoot = false; bool m_runAsRoot = false;
@@ -1425,16 +1425,16 @@ static QProcess::ProcessChannelMode defaultProcessChannelMode()
? QProcess::MergedChannels : QProcess::SeparateChannels; ? QProcess::MergedChannels : QProcess::SeparateChannels;
} }
SimpleTargetRunnerPrivate::SimpleTargetRunnerPrivate(SimpleTargetRunner *parent) ProcessRunnerPrivate::ProcessRunnerPrivate(ProcessRunner *parent)
: q(parent) : q(parent)
{ {
m_process.setProcessChannelMode(defaultProcessChannelMode()); m_process.setProcessChannelMode(defaultProcessChannelMode());
connect(&m_process, &Process::started, this, &SimpleTargetRunnerPrivate::forwardStarted); connect(&m_process, &Process::started, this, &ProcessRunnerPrivate::forwardStarted);
connect(&m_process, &Process::done, this, &SimpleTargetRunnerPrivate::handleDone); connect(&m_process, &Process::done, this, &ProcessRunnerPrivate::handleDone);
connect(&m_process, &Process::readyReadStandardError, connect(&m_process, &Process::readyReadStandardError,
this, &SimpleTargetRunnerPrivate::handleStandardError); this, &ProcessRunnerPrivate::handleStandardError);
connect(&m_process, &Process::readyReadStandardOutput, connect(&m_process, &Process::readyReadStandardOutput,
this, &SimpleTargetRunnerPrivate::handleStandardOutput); this, &ProcessRunnerPrivate::handleStandardOutput);
connect(&m_process, &Process::requestingStop, this, [this] { connect(&m_process, &Process::requestingStop, this, [this] {
q->appendMessage(Tr::tr("Requesting process to stop ...."), NormalMessageFormat); q->appendMessage(Tr::tr("Requesting process to stop ...."), NormalMessageFormat);
}); });
@@ -1471,13 +1471,13 @@ SimpleTargetRunnerPrivate::SimpleTargetRunnerPrivate(SimpleTargetRunner *parent)
} }
} }
SimpleTargetRunnerPrivate::~SimpleTargetRunnerPrivate() ProcessRunnerPrivate::~ProcessRunnerPrivate()
{ {
if (m_state == Run) if (m_state == Run)
forwardDone(); forwardDone();
} }
void SimpleTargetRunnerPrivate::stop() void ProcessRunnerPrivate::stop()
{ {
if (m_stopRequested || m_state != Run) if (m_stopRequested || m_state != Run)
return; return;
@@ -1489,12 +1489,12 @@ void SimpleTargetRunnerPrivate::stop()
m_process.stop(); m_process.stop();
} }
bool SimpleTargetRunnerPrivate::isRunning() const bool ProcessRunnerPrivate::isRunning() const
{ {
return m_process.state() != QProcess::NotRunning; return m_process.state() != QProcess::NotRunning;
} }
qint64 SimpleTargetRunnerPrivate::privateApplicationPID() const qint64 ProcessRunnerPrivate::privateApplicationPID() const
{ {
if (!isRunning()) if (!isRunning())
return 0; return 0;
@@ -1502,14 +1502,14 @@ qint64 SimpleTargetRunnerPrivate::privateApplicationPID() const
return m_process.processId(); return m_process.processId();
} }
void SimpleTargetRunnerPrivate::handleDone() void ProcessRunnerPrivate::handleDone()
{ {
m_resultData = m_process.resultData(); m_resultData = m_process.resultData();
QTC_CHECK(m_state == Run); QTC_CHECK(m_state == Run);
forwardDone(); forwardDone();
} }
void SimpleTargetRunnerPrivate::handleStandardOutput() void ProcessRunnerPrivate::handleStandardOutput()
{ {
if (m_suppressDefaultStdOutHandling) if (m_suppressDefaultStdOutHandling)
return; return;
@@ -1518,7 +1518,7 @@ void SimpleTargetRunnerPrivate::handleStandardOutput()
q->appendMessage(msg, StdOutFormat, false); q->appendMessage(msg, StdOutFormat, false);
} }
void SimpleTargetRunnerPrivate::handleStandardError() void ProcessRunnerPrivate::handleStandardError()
{ {
if (m_suppressDefaultStdOutHandling) if (m_suppressDefaultStdOutHandling)
return; return;
@@ -1527,7 +1527,7 @@ void SimpleTargetRunnerPrivate::handleStandardError()
q->appendMessage(msg, StdErrFormat, false); q->appendMessage(msg, StdErrFormat, false);
} }
void SimpleTargetRunnerPrivate::start() void ProcessRunnerPrivate::start()
{ {
CommandLine cmdLine = m_command; CommandLine cmdLine = m_command;
Environment env = m_environment; Environment env = m_environment;
@@ -1576,9 +1576,9 @@ void SimpleTargetRunnerPrivate::start()
} }
/*! /*!
\class ProjectExplorer::SimpleTargetRunner \class ProjectExplorer::ProcessRunner
\brief The SimpleTargetRunner class is the application launcher of the \brief The ProcessRunner class is the application launcher of the
ProjectExplorer plugin. ProjectExplorer plugin.
Encapsulates processes running in a console or as GUI processes, Encapsulates processes running in a console or as GUI processes,
@@ -1586,15 +1586,15 @@ void SimpleTargetRunnerPrivate::start()
\sa Utils::Process \sa Utils::Process
*/ */
SimpleTargetRunner::SimpleTargetRunner(RunControl *runControl) ProcessRunner::ProcessRunner(RunControl *runControl)
: RunWorker(runControl), d(new Internal::SimpleTargetRunnerPrivate(this)) : RunWorker(runControl), d(new Internal::ProcessRunnerPrivate(this))
{ {
setId("SimpleTargetRunner"); setId("ProcessRunner");
} }
SimpleTargetRunner::~SimpleTargetRunner() = default; ProcessRunner::~ProcessRunner() = default;
void SimpleTargetRunnerPrivate::forwardDone() void ProcessRunnerPrivate::forwardDone()
{ {
if (m_stopReported) if (m_stopReported)
return; return;
@@ -1615,7 +1615,7 @@ void SimpleTargetRunnerPrivate::forwardDone()
q->reportStopped(); q->reportStopped();
} }
void SimpleTargetRunnerPrivate::forwardStarted() void ProcessRunnerPrivate::forwardStarted()
{ {
const bool isDesktop = m_command.executable().isLocal(); const bool isDesktop = m_command.executable().isLocal();
if (isDesktop) { if (isDesktop) {
@@ -1628,7 +1628,7 @@ void SimpleTargetRunnerPrivate::forwardStarted()
q->reportStarted(); q->reportStarted();
} }
void SimpleTargetRunner::start() void ProcessRunner::start()
{ {
d->m_command = runControl()->commandLine(); d->m_command = runControl()->commandLine();
d->m_workingDirectory = runControl()->workingDirectory(); d->m_workingDirectory = runControl()->workingDirectory();
@@ -1673,53 +1673,53 @@ void SimpleTargetRunner::start()
d->start(); d->start();
} }
void SimpleTargetRunner::stop() void ProcessRunner::stop()
{ {
d->m_stopForced = true; d->m_stopForced = true;
d->stop(); d->stop();
} }
void SimpleTargetRunner::setStartModifier(const std::function<void ()> &startModifier) void ProcessRunner::setStartModifier(const std::function<void ()> &startModifier)
{ {
d->m_startModifier = startModifier; d->m_startModifier = startModifier;
} }
CommandLine SimpleTargetRunner::commandLine() const CommandLine ProcessRunner::commandLine() const
{ {
return d->m_command; return d->m_command;
} }
void SimpleTargetRunner::setCommandLine(const Utils::CommandLine &commandLine) void ProcessRunner::setCommandLine(const Utils::CommandLine &commandLine)
{ {
d->m_command = commandLine; d->m_command = commandLine;
} }
void SimpleTargetRunner::setEnvironment(const Environment &environment) void ProcessRunner::setEnvironment(const Environment &environment)
{ {
d->m_environment = environment; d->m_environment = environment;
} }
void SimpleTargetRunner::setWorkingDirectory(const FilePath &workingDirectory) void ProcessRunner::setWorkingDirectory(const FilePath &workingDirectory)
{ {
d->m_workingDirectory = workingDirectory; d->m_workingDirectory = workingDirectory;
} }
void SimpleTargetRunner::setProcessMode(Utils::ProcessMode processMode) void ProcessRunner::setProcessMode(Utils::ProcessMode processMode)
{ {
d->m_process.setProcessMode(processMode); d->m_process.setProcessMode(processMode);
} }
Process *SimpleTargetRunner::process() const Process *ProcessRunner::process() const
{ {
return &d->m_process; return &d->m_process;
} }
void SimpleTargetRunner::suppressDefaultStdOutHandling() void ProcessRunner::suppressDefaultStdOutHandling()
{ {
d->m_suppressDefaultStdOutHandling = true; d->m_suppressDefaultStdOutHandling = true;
} }
void SimpleTargetRunner::forceRunOnHost() void ProcessRunner::forceRunOnHost()
{ {
const FilePath executable = d->m_command.executable(); const FilePath executable = d->m_command.executable();
if (!executable.isLocal()) { if (!executable.isLocal()) {
@@ -2031,11 +2031,11 @@ void addOutputParserFactory(const std::function<Utils::OutputLineParser *(Target
g_outputParserFactories.append(factory); g_outputParserFactories.append(factory);
} }
// SimpleTargetRunnerFactory // ProcessRunnerFactory
SimpleTargetRunnerFactory::SimpleTargetRunnerFactory(const QList<Id> &runConfigs) ProcessRunnerFactory::ProcessRunnerFactory(const QList<Id> &runConfigs)
{ {
setProduct<SimpleTargetRunner>(); setProduct<ProcessRunner>();
addSupportedRunMode(ProjectExplorer::Constants::NORMAL_RUN_MODE); addSupportedRunMode(ProjectExplorer::Constants::NORMAL_RUN_MODE);
setSupportedRunConfigs(runConfigs); setSupportedRunConfigs(runConfigs);
} }

View File

@@ -38,7 +38,7 @@ class Target;
namespace Internal { namespace Internal {
class RunControlPrivate; class RunControlPrivate;
class RunWorkerPrivate; class RunWorkerPrivate;
class SimpleTargetRunnerPrivate; class ProcessRunnerPrivate;
} // Internal } // Internal
class PROJECTEXPLORER_EXPORT RunWorker : public QObject class PROJECTEXPLORER_EXPORT RunWorker : public QObject
@@ -277,17 +277,11 @@ private:
const std::unique_ptr<Internal::RunControlPrivate> d; const std::unique_ptr<Internal::RunControlPrivate> d;
}; };
class PROJECTEXPLORER_EXPORT ProcessRunner final : public RunWorker
/**
* A simple TargetRunner for cases where a plain ApplicationLauncher is
* sufficient for running purposes.
*/
class PROJECTEXPLORER_EXPORT SimpleTargetRunner final : public RunWorker
{ {
public: public:
explicit SimpleTargetRunner(RunControl *runControl); explicit ProcessRunner(RunControl *runControl);
~SimpleTargetRunner() override; ~ProcessRunner() override;
void setStartModifier(const std::function<void()> &startModifier); void setStartModifier(const std::function<void()> &startModifier);
@@ -309,13 +303,13 @@ private:
const Utils::ProcessRunData &runnable() const = delete; const Utils::ProcessRunData &runnable() const = delete;
void setRunnable(const Utils::ProcessRunData &) = delete; void setRunnable(const Utils::ProcessRunData &) = delete;
const std::unique_ptr<Internal::SimpleTargetRunnerPrivate> d; const std::unique_ptr<Internal::ProcessRunnerPrivate> d;
}; };
class PROJECTEXPLORER_EXPORT SimpleTargetRunnerFactory : public RunWorkerFactory class PROJECTEXPLORER_EXPORT ProcessRunnerFactory : public RunWorkerFactory
{ {
public: public:
explicit SimpleTargetRunnerFactory(const QList<Utils::Id> &runConfig); explicit ProcessRunnerFactory(const QList<Utils::Id> &runConfig);
}; };

View File

@@ -437,7 +437,7 @@ class WorkspaceProjectRunWorkerFactory : public RunWorkerFactory
public: public:
WorkspaceProjectRunWorkerFactory() WorkspaceProjectRunWorkerFactory()
{ {
setProduct<SimpleTargetRunner>(); setProduct<ProcessRunner>();
addSupportedRunMode(Constants::NORMAL_RUN_MODE); addSupportedRunMode(Constants::NORMAL_RUN_MODE);
addSupportedRunConfig(WORKSPACE_PROJECT_RUNCONFIG_ID); addSupportedRunConfig(WORKSPACE_PROJECT_RUNCONFIG_ID);
} }

View File

@@ -178,7 +178,7 @@ void setupPythonRunConfiguration()
void setupPythonRunWorker() void setupPythonRunWorker()
{ {
static SimpleTargetRunnerFactory thePythonRunWorkerFactory( static ProcessRunnerFactory thePythonRunWorkerFactory(
{Constants::C_PYTHONRUNCONFIGURATION_ID} {Constants::C_PYTHONRUNCONFIGURATION_ID}
); );
} }

View File

@@ -178,7 +178,7 @@ LocalQmlPreviewSupportFactory::LocalQmlPreviewSupportFactory()
{ {
setId(ProjectExplorer::Constants::QML_PREVIEW_RUN_FACTORY); setId(ProjectExplorer::Constants::QML_PREVIEW_RUN_FACTORY);
setProducer([](RunControl *runControl) { setProducer([](RunControl *runControl) {
auto worker = new SimpleTargetRunner(runControl); auto worker = new ProcessRunner(runControl);
worker->setId("LocalQmlPreviewSupport"); worker->setId("LocalQmlPreviewSupport");
runControl->setQmlChannel(Utils::urlFromLocalSocket()); runControl->setQmlChannel(Utils::urlFromLocalSocket());

View File

@@ -144,7 +144,7 @@ void QmlProfilerRunner::profilerStateChanged()
RunWorker *createLocalQmlProfilerWorker(RunControl *runControl) RunWorker *createLocalQmlProfilerWorker(RunControl *runControl)
{ {
auto worker = new SimpleTargetRunner(runControl); auto worker = new ProcessRunner(runControl);
worker->setId("LocalQmlProfilerSupport"); worker->setId("LocalQmlProfilerSupport");

View File

@@ -272,7 +272,7 @@ private:
void extensionsInitialized() final void extensionsInitialized() final
{ {
// These rely on the base tool factories being present: // These rely on the base tool factories being present:
static SimpleTargetRunnerFactory runWorkerFactory{{Constants::QML_RUNCONFIG_ID}}; static ProcessRunnerFactory runWorkerFactory{{Constants::QML_RUNCONFIG_ID}};
static SimpleQmlProfilerRunnerFactory qmlProfilerRunWorkerFactory{{Constants::QML_RUNCONFIG_ID}}; static SimpleQmlProfilerRunnerFactory qmlProfilerRunWorkerFactory{{Constants::QML_RUNCONFIG_ID}};
static SimpleDebugRunnerFactory debugRunWorkerFactory{{Constants::QML_RUNCONFIG_ID}}; static SimpleDebugRunnerFactory debugRunWorkerFactory{{Constants::QML_RUNCONFIG_ID}};
static SimplePreviewRunnerFactory previewRunWorkerFactory{{Constants::QML_RUNCONFIG_ID}}; static SimplePreviewRunnerFactory previewRunWorkerFactory{{Constants::QML_RUNCONFIG_ID}};

View File

@@ -21,7 +21,7 @@ public:
QnxQmlProfilerWorkerFactory() QnxQmlProfilerWorkerFactory()
{ {
setProducer([](RunControl *runControl) { setProducer([](RunControl *runControl) {
auto worker = new SimpleTargetRunner(runControl); auto worker = new ProcessRunner(runControl);
worker->setId("QnxQmlProfilerSupport"); worker->setId("QnxQmlProfilerSupport");
worker->appendMessage(Tr::tr("Preparing remote side..."), LogMessageFormat); worker->appendMessage(Tr::tr("Preparing remote side..."), LogMessageFormat);

View File

@@ -136,7 +136,7 @@ void showAttachToProcessDialog()
debugger->setupPortsGatherer(); debugger->setupPortsGatherer();
debugger->setUseCtrlCStub(true); debugger->setUseCtrlCStub(true);
if (debugger->isCppDebugging()) { if (debugger->isCppDebugging()) {
auto pdebugRunner = new SimpleTargetRunner(runControl); auto pdebugRunner = new ProcessRunner(runControl);
pdebugRunner->setId("PDebugRunner"); pdebugRunner->setId("PDebugRunner");
pdebugRunner->setStartModifier([pdebugRunner, debugger] { pdebugRunner->setStartModifier([pdebugRunner, debugger] {
const int pdebugPort = debugger->debugChannel().port(); const int pdebugPort = debugger->debugChannel().port();
@@ -175,7 +175,7 @@ public:
debugger->setupPortsGatherer(); debugger->setupPortsGatherer();
auto debuggeeRunner = new SimpleTargetRunner(runControl); auto debuggeeRunner = new ProcessRunner(runControl);
debuggeeRunner->setId("QnxDebuggeeRunner"); debuggeeRunner->setId("QnxDebuggeeRunner");
debuggeeRunner->setStartModifier([debuggeeRunner] { debuggeeRunner->setStartModifier([debuggeeRunner] {

View File

@@ -95,7 +95,7 @@ public:
void setupQnxRunnning() void setupQnxRunnning()
{ {
static QnxRunConfigurationFactory theQnxRunConfigurationFactory; static QnxRunConfigurationFactory theQnxRunConfigurationFactory;
static SimpleTargetRunnerFactory theQnxRunWorkerFactory({Constants::QNX_RUNCONFIG_ID}); static ProcessRunnerFactory theQnxRunWorkerFactory({Constants::QNX_RUNCONFIG_ID});
} }
} // Qnx::Internal } // Qnx::Internal

View File

@@ -43,7 +43,7 @@ namespace AppManager::Internal {
static RunWorker *createInferiorRunner(RunControl *runControl, QmlDebugServicesPreset qmlServices) static RunWorker *createInferiorRunner(RunControl *runControl, QmlDebugServicesPreset qmlServices)
{ {
auto worker = new SimpleTargetRunner(runControl); auto worker = new ProcessRunner(runControl);
worker->setId(AppManager::Constants::DEBUG_LAUNCHER_ID); worker->setId(AppManager::Constants::DEBUG_LAUNCHER_ID);
worker->setEssential(true); worker->setEssential(true);
@@ -193,7 +193,7 @@ public:
AppManagerRunWorkerFactory() AppManagerRunWorkerFactory()
{ {
setProducer([](RunControl *runControl) { setProducer([](RunControl *runControl) {
auto worker = new SimpleTargetRunner(runControl); auto worker = new ProcessRunner(runControl);
worker->setId("ApplicationManagerPlugin.Run.TargetRunner"); worker->setId("ApplicationManagerPlugin.Run.TargetRunner");
QObject::connect(worker, &RunWorker::stopped, worker, [worker, runControl] { QObject::connect(worker, &RunWorker::stopped, worker, [worker, runControl] {
worker->appendMessage( worker->appendMessage(

View File

@@ -32,7 +32,7 @@ class RemoteLinuxRunWorkerFactory final : public RunWorkerFactory
public: public:
RemoteLinuxRunWorkerFactory() RemoteLinuxRunWorkerFactory()
{ {
setProduct<SimpleTargetRunner>(); setProduct<ProcessRunner>();
addSupportedRunMode(ProjectExplorer::Constants::NORMAL_RUN_MODE); addSupportedRunMode(ProjectExplorer::Constants::NORMAL_RUN_MODE);
addSupportedDeviceType(Constants::GenericLinuxOsType); addSupportedDeviceType(Constants::GenericLinuxOsType);
setSupportedRunConfigs(supportedRunConfigs()); setSupportedRunConfigs(supportedRunConfigs());
@@ -76,7 +76,7 @@ public:
setProducer([](RunControl *runControl) { setProducer([](RunControl *runControl) {
runControl->requestQmlChannel(); runControl->requestQmlChannel();
auto worker = new SimpleTargetRunner(runControl); auto worker = new ProcessRunner(runControl);
worker->setId("RemoteLinuxQmlToolingSupport"); worker->setId("RemoteLinuxQmlToolingSupport");
auto runworker = runControl->createWorker(runnerIdForRunMode(runControl->runMode())); auto runworker = runControl->createWorker(runnerIdForRunMode(runControl->runMode()));

View File

@@ -216,7 +216,7 @@ public:
EmrunRunWorkerFactory() EmrunRunWorkerFactory()
{ {
setProducer([](RunControl *runControl) { setProducer([](RunControl *runControl) {
auto worker = new SimpleTargetRunner(runControl); auto worker = new ProcessRunner(runControl);
runControl->requestWorkerChannel(); runControl->requestWorkerChannel();
worker->setStartModifier([worker, runControl] { worker->setStartModifier([worker, runControl] {