diff options
Diffstat (limited to 'src')
73 files changed, 147 insertions, 286 deletions
diff --git a/src/plugins/android/androiddevice.cpp b/src/plugins/android/androiddevice.cpp index ae38ff5dad..48aaa35cca 100644 --- a/src/plugins/android/androiddevice.cpp +++ b/src/plugins/android/androiddevice.cpp @@ -29,7 +29,6 @@ #include "androidconfigurations.h" #include <projectexplorer/runconfiguration.h> -#include <projectexplorer/runnables.h> #include <utils/url.h> diff --git a/src/plugins/android/androidplugin.cpp b/src/plugins/android/androidplugin.cpp index c9360527fb..6f44abbbbd 100644 --- a/src/plugins/android/androidplugin.cpp +++ b/src/plugins/android/androidplugin.cpp @@ -97,10 +97,7 @@ bool AndroidPlugin::initialize(const QStringList &arguments, QString *errorMessa RunControl::registerWorker(QML_PREVIEW_RUN_MODE, [](RunControl *runControl) -> RunWorker* { const Runnable runnable = runControl->runConfiguration()->runnable(); - QTC_ASSERT(runnable.is<StandardRunnable>(), return nullptr); - const StandardRunnable standardRunnable = runnable.as<StandardRunnable>(); - return new AndroidQmlToolingSupport(runControl, standardRunnable.executable, - standardRunnable.commandLineArguments); + return new AndroidQmlToolingSupport(runControl, runnable.executable, runnable.commandLineArguments); }, [](RunConfiguration *runConfig) { return runConfig->isEnabled() && runConfig->id().name().startsWith("QmlProjectManager.QmlRunConfiguration") diff --git a/src/plugins/autotest/testconfiguration.cpp b/src/plugins/autotest/testconfiguration.cpp index 09617d17a4..95e6fb7388 100644 --- a/src/plugins/autotest/testconfiguration.cpp +++ b/src/plugins/autotest/testconfiguration.cpp @@ -35,7 +35,6 @@ #include <projectexplorer/deploymentdata.h> #include <projectexplorer/environmentaspect.h> #include <projectexplorer/kitinformation.h> -#include <projectexplorer/runnables.h> #include <projectexplorer/runconfiguration.h> #include <projectexplorer/session.h> #include <projectexplorer/target.h> @@ -93,10 +92,7 @@ void TestConfiguration::completeTestInformation(ProjectExplorer::RunConfiguratio return; } - Runnable runnable = rc->runnable(); - if (!runnable.is<StandardRunnable>()) - return; - m_runnable = runnable.as<StandardRunnable>(); + m_runnable = rc->runnable(); m_displayName = rc->displayName(); m_project = rc->project(); @@ -193,15 +189,10 @@ void TestConfiguration::completeTestInformation(TestRunMode runMode) continue; } - Runnable runnable = runConfig->runnable(); - if (!runnable.is<StandardRunnable>()) { - qCDebug(LOG) << " Skipped as not being a StandardRunnable"; - continue; - } - StandardRunnable stdRunnable = runnable.as<StandardRunnable>(); + const Runnable runnable = runConfig->runnable(); // not the best approach - but depending on the build system and whether the executables // are going to get installed or not we have to soften the condition... - const QString ¤tExecutable = ensureExeEnding(stdRunnable.executable); + const QString currentExecutable = ensureExeEnding(runnable.executable); const QString currentBST = runConfig->buildKey() + '|'; qCDebug(LOG) << " CurrentExecutable" << currentExecutable; qCDebug(LOG) << " BST of RunConfig" << currentBST; @@ -213,7 +204,7 @@ void TestConfiguration::completeTestInformation(TestRunMode runMode) }))) { qCDebug(LOG) << " Using this RunConfig."; m_origRunConfig = runConfig; - m_runnable = stdRunnable; + m_runnable = runnable; m_runnable.executable = currentExecutable; m_displayName = runConfig->displayName(); m_project = project; @@ -234,16 +225,13 @@ void TestConfiguration::completeTestInformation(TestRunMode runMode) // we failed to find a valid runconfiguration - but we've got the executable already if (auto rc = target->activeRunConfiguration()) { if (isLocal(rc)) { // FIXME for now only Desktop support - Runnable runnable = rc->runnable(); - if (runnable.is<StandardRunnable>()) { - StandardRunnable stdRunnable = runnable.as<StandardRunnable>(); - m_runnable.environment = stdRunnable.environment; - m_project = project; - m_guessedConfiguration = true; - m_guessedFrom = rc->displayName(); - if (runMode == TestRunMode::Debug) - m_runConfig = new TestRunConfiguration(rc->target(), this); - } + const Runnable runnable = rc->runnable(); + m_runnable.environment = runnable.environment; + m_project = project; + m_guessedConfiguration = true; + m_guessedFrom = rc->displayName(); + if (runMode == TestRunMode::Debug) + m_runConfig = new TestRunConfiguration(rc->target(), this); } else { qCDebug(LOG) << "not using the fallback as the current active run configuration " "appears to be non-Desktop"; diff --git a/src/plugins/autotest/testconfiguration.h b/src/plugins/autotest/testconfiguration.h index 224d7b19fe..4e98c9ee9c 100644 --- a/src/plugins/autotest/testconfiguration.h +++ b/src/plugins/autotest/testconfiguration.h @@ -28,7 +28,7 @@ #include "autotestconstants.h" #include <projectexplorer/project.h> -#include <projectexplorer/runnables.h> +#include <projectexplorer/runconfiguration.h> #include <utils/environment.h> #include <QFutureInterface> @@ -88,7 +88,7 @@ public: QString runConfigDisplayName() const { return m_guessedConfiguration ? m_guessedFrom : m_displayName; } - ProjectExplorer::StandardRunnable runnable() const { return m_runnable; } + ProjectExplorer::Runnable runnable() const { return m_runnable; } virtual TestOutputReader *outputReader(const QFutureInterface<TestResultPtr> &fi, QProcess *app) const = 0; virtual QStringList argumentsForTestRunner(QStringList *omitted = nullptr) const = 0; @@ -105,7 +105,7 @@ private: TestRunConfiguration *m_runConfig = nullptr; QSet<QString> m_buildTargets; ProjectExplorer::RunConfiguration *m_origRunConfig = nullptr; - ProjectExplorer::StandardRunnable m_runnable; + ProjectExplorer::Runnable m_runnable; }; class DebuggableTestConfiguration : public TestConfiguration diff --git a/src/plugins/autotest/testrunconfiguration.h b/src/plugins/autotest/testrunconfiguration.h index 4868ef7b5a..695ccfc962 100644 --- a/src/plugins/autotest/testrunconfiguration.h +++ b/src/plugins/autotest/testrunconfiguration.h @@ -32,7 +32,6 @@ #include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/devicesupport/devicemanager.h> #include <projectexplorer/runconfiguration.h> -#include <projectexplorer/runnables.h> #include <utils/qtcassert.h> #include <debugger/debuggerrunconfigurationaspect.h> @@ -62,7 +61,7 @@ public: ProjectExplorer::Runnable runnable() const override { - ProjectExplorer::StandardRunnable r; + ProjectExplorer::Runnable r; QTC_ASSERT(m_testConfig, return r); r.executable = m_testConfig->executableFilePath(); r.commandLineArguments = m_testConfig->argumentsForTestRunner().join(' '); diff --git a/src/plugins/autotest/testrunner.cpp b/src/plugins/autotest/testrunner.cpp index e70870b417..c2f996b8d2 100644 --- a/src/plugins/autotest/testrunner.cpp +++ b/src/plugins/autotest/testrunner.cpp @@ -336,9 +336,7 @@ static ProjectExplorer::RunConfiguration *getRunConfiguration(const QString &dia RunConfiguration *runConfig = nullptr; const QList<RunConfiguration *> runConfigurations = Utils::filtered(target->runConfigurations(), [] (const RunConfiguration *rc) { - if (!rc->runnable().is<StandardRunnable>()) - return false; - return !rc->runnable().as<StandardRunnable>().executable.isEmpty(); + return !rc->runnable().executable.isEmpty(); }); if (runConfigurations.size() == 1) return runConfigurations.first(); @@ -353,7 +351,7 @@ static ProjectExplorer::RunConfiguration *getRunConfiguration(const QString &dia runConfig = Utils::findOr(runConfigurations, nullptr, [&dName, &exe] (const RunConfiguration *rc) { if (rc->displayName() != dName) return false; - return rc->runnable().as<StandardRunnable>().executable == exe; + return rc->runnable().executable == exe; }); } return runConfig; @@ -489,7 +487,7 @@ void TestRunner::debugTests() } QStringList omitted; - ProjectExplorer::StandardRunnable inferior = config->runnable(); + ProjectExplorer::Runnable inferior = config->runnable(); inferior.executable = commandFilePath; const QStringList args = config->argumentsForTestRunner(&omitted); @@ -660,13 +658,11 @@ void RunConfigurationSelectionDialog::populate() if (auto project = ProjectExplorer::SessionManager::startupProject()) { if (auto target = project->activeTarget()) { for (ProjectExplorer::RunConfiguration *rc : target->runConfigurations()) { - if (rc->runnable().is<ProjectExplorer::StandardRunnable>()) { - auto runnable = rc->runnable().as<ProjectExplorer::StandardRunnable>(); - const QStringList rcDetails = { runnable.executable, - runnable.commandLineArguments, - runnable.workingDirectory }; - m_rcCombo->addItem(rc->displayName(), rcDetails); - } + auto runnable = rc->runnable(); + const QStringList rcDetails = { runnable.executable, + runnable.commandLineArguments, + runnable.workingDirectory }; + m_rcCombo->addItem(rc->displayName(), rcDetails); } } } diff --git a/src/plugins/baremetal/baremetaldebugsupport.cpp b/src/plugins/baremetal/baremetaldebugsupport.cpp index a86f99268b..cab1ce87ca 100644 --- a/src/plugins/baremetal/baremetaldebugsupport.cpp +++ b/src/plugins/baremetal/baremetaldebugsupport.cpp @@ -37,7 +37,6 @@ #include <projectexplorer/buildsteplist.h> #include <projectexplorer/kitinformation.h> #include <projectexplorer/project.h> -#include <projectexplorer/runnables.h> #include <projectexplorer/runconfiguration.h> #include <projectexplorer/runconfigurationaspects.h> #include <projectexplorer/target.h> @@ -70,7 +69,7 @@ BareMetalDebugSupport::BareMetalDebugSupport(RunControl *runControl) } if (p->startupMode() == GdbServerProvider::StartupOnNetwork) { - StandardRunnable r; + Runnable r; r.executable = p->executable(); // We need to wrap the command arguments depending on a host OS, // as the bare metal's GDB servers are launched on a host, @@ -123,7 +122,7 @@ void BareMetalDebugSupport::start() setCommandsAfterConnect(commands); #endif - StandardRunnable inferior; + Runnable inferior; inferior.executable = bin; if (auto aspect = rc->extraAspect<ArgumentsAspect>()) inferior.commandLineArguments = aspect->arguments(); diff --git a/src/plugins/baremetal/gdbserverproviderprocess.cpp b/src/plugins/baremetal/gdbserverproviderprocess.cpp index 0a3a7e3448..45d14d57e0 100644 --- a/src/plugins/baremetal/gdbserverproviderprocess.cpp +++ b/src/plugins/baremetal/gdbserverproviderprocess.cpp @@ -26,14 +26,11 @@ #include "gdbserverproviderprocess.h" #include <projectexplorer/devicesupport/idevice.h> -#include <projectexplorer/runnables.h> #include <utils/environment.h> #include <utils/qtcprocess.h> #include <utils/qtcassert.h> -#include <QStringList> - using namespace ProjectExplorer; namespace BareMetal { @@ -62,10 +59,8 @@ GdbServerProviderProcess::GdbServerProviderProcess( void GdbServerProviderProcess::start(const ProjectExplorer::Runnable &runnable) { - QTC_ASSERT(runnable.is<StandardRunnable>(), return); QTC_ASSERT(m_process->state() == QProcess::NotRunning, return); - auto r = runnable.as<StandardRunnable>(); - m_process->setCommand(r.executable, r.commandLineArguments); + m_process->setCommand(runnable.executable, runnable.commandLineArguments); m_process->start(); } diff --git a/src/plugins/baremetal/gdbserverproviderprocess.h b/src/plugins/baremetal/gdbserverproviderprocess.h index c4452d2e24..4065ec5d10 100644 --- a/src/plugins/baremetal/gdbserverproviderprocess.h +++ b/src/plugins/baremetal/gdbserverproviderprocess.h @@ -27,7 +27,6 @@ #include <projectexplorer/devicesupport/deviceprocess.h> -namespace ProjectExplorer { class Runnable; } namespace Utils { class QtcProcess; } namespace BareMetal { diff --git a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.h b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.h index 7d9fdcc7cf..e9d0e18827 100644 --- a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.h +++ b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.h @@ -25,7 +25,7 @@ #pragma once -#include <projectexplorer/runnables.h> +#include <projectexplorer/runconfiguration.h> namespace CMakeProjectManager { namespace Internal { diff --git a/src/plugins/debugger/analyzer/startremotedialog.cpp b/src/plugins/debugger/analyzer/startremotedialog.cpp index 810bbd4b5c..9f2ce7f53b 100644 --- a/src/plugins/debugger/analyzer/startremotedialog.cpp +++ b/src/plugins/debugger/analyzer/startremotedialog.cpp @@ -28,7 +28,7 @@ #include <coreplugin/icore.h> #include <projectexplorer/kitchooser.h> #include <projectexplorer/kitinformation.h> -#include <projectexplorer/runnables.h> +#include <projectexplorer/runconfiguration.h> #include <ssh/sshconnection.h> #include <QDialogButtonBox> @@ -131,7 +131,7 @@ void StartRemoteDialog::validate() Runnable StartRemoteDialog::runnable() const { Kit *kit = d->kitChooser->currentKit(); - StandardRunnable r; + Runnable r; r.device = DeviceKitInformation::device(kit); r.executable = d->executable->text(); r.commandLineArguments = d->arguments->text(); diff --git a/src/plugins/debugger/debuggerdialogs.cpp b/src/plugins/debugger/debuggerdialogs.cpp index 59e2309d1f..c7934e6839 100644 --- a/src/plugins/debugger/debuggerdialogs.cpp +++ b/src/plugins/debugger/debuggerdialogs.cpp @@ -31,7 +31,6 @@ #include <coreplugin/icore.h> #include <projectexplorer/projectexplorerconstants.h> -#include <projectexplorer/runnables.h> #include <projectexplorer/toolchain.h> #include <app/app_version.h> @@ -147,7 +146,7 @@ public: Id kitId; uint serverPort; QString serverAddress; - StandardRunnable runnable; + Runnable runnable; bool breakAtMain = false; QString serverStartScript; QString debugInfoLocation; @@ -424,7 +423,7 @@ void StartApplicationDialog::run(bool attachRemote) settings->endGroup(); } - StandardRunnable inferior = newParameters.runnable; + Runnable inferior = newParameters.runnable; const QString inputAddress = dialog.d->channelOverrideEdit->text(); if (!inputAddress.isEmpty()) debugger->setRemoteChannel(inputAddress); diff --git a/src/plugins/debugger/debuggerengine.h b/src/plugins/debugger/debuggerengine.h index 27b48be32e..f9ebfa009b 100644 --- a/src/plugins/debugger/debuggerengine.h +++ b/src/plugins/debugger/debuggerengine.h @@ -31,7 +31,7 @@ #include "debuggerprotocol.h" #include <projectexplorer/devicesupport/idevice.h> -#include <projectexplorer/runnables.h> +#include <projectexplorer/runconfiguration.h> #include <texteditor/textmark.h> #include <QObject> @@ -82,7 +82,7 @@ public: DebuggerStartMode startMode = NoStartMode; DebuggerCloseMode closeMode = KillAtClose; - ProjectExplorer::StandardRunnable inferior; + ProjectExplorer::Runnable inferior; QString displayName; // Used in the Snapshots view. Utils::ProcessHandle attachPID; QStringList solibSearchPath; @@ -133,7 +133,7 @@ public: bool breakOnMain = false; bool multiProcess = false; // Whether to set detach-on-fork off. - ProjectExplorer::StandardRunnable debugger; + ProjectExplorer::Runnable debugger; QString overrideStartScript; // Used in attach to core and remote debugging QString startMessage; // First status message shown. QString debugInfoLocation; // Gdb "set-debug-file-directory". diff --git a/src/plugins/debugger/debuggerkitinformation.cpp b/src/plugins/debugger/debuggerkitinformation.cpp index 9f723d70c3..6ac69858c4 100644 --- a/src/plugins/debugger/debuggerkitinformation.cpp +++ b/src/plugins/debugger/debuggerkitinformation.cpp @@ -254,9 +254,9 @@ const DebuggerItem *DebuggerKitInformation::debugger(const Kit *kit) return DebuggerItemManager::findById(id); } -StandardRunnable DebuggerKitInformation::runnable(const Kit *kit) +Runnable DebuggerKitInformation::runnable(const Kit *kit) { - StandardRunnable runnable; + Runnable runnable; if (const DebuggerItem *item = debugger(kit)) { runnable.executable = item->command().toString(); runnable.workingDirectory = item->workingDirectory().toString(); diff --git a/src/plugins/debugger/debuggerkitinformation.h b/src/plugins/debugger/debuggerkitinformation.h index cbe438e3f5..035f00dedf 100644 --- a/src/plugins/debugger/debuggerkitinformation.h +++ b/src/plugins/debugger/debuggerkitinformation.h @@ -29,7 +29,7 @@ #include "debuggerconstants.h" #include <projectexplorer/kitinformation.h> -#include <projectexplorer/runnables.h> +#include <projectexplorer/runconfiguration.h> namespace Debugger { class DebuggerItem; @@ -50,7 +50,7 @@ public: void fix(ProjectExplorer::Kit *k) override; static const DebuggerItem *debugger(const ProjectExplorer::Kit *kit); - static ProjectExplorer::StandardRunnable runnable(const ProjectExplorer::Kit *kit); + static ProjectExplorer::Runnable runnable(const ProjectExplorer::Kit *kit); enum ConfigurationError { diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index f92b55d6ea..0857b63ba6 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -101,7 +101,6 @@ #include <projectexplorer/projectexplorersettings.h> #include <projectexplorer/projecttree.h> #include <projectexplorer/runconfiguration.h> -#include <projectexplorer/runnables.h> #include <projectexplorer/session.h> #include <projectexplorer/target.h> #include <projectexplorer/taskhub.h> @@ -3024,11 +3023,8 @@ void DebuggerPluginPrivate::extensionsInitialized() auto constraint = [](RunConfiguration *runConfig) { Runnable runnable = runConfig->runnable(); - if (runnable.is<StandardRunnable>()) { - IDevice::ConstPtr device = runnable.as<StandardRunnable>().device; - if (device && device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) - return true; - } + if (runnable.device && runnable.device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) + return true; if (DeviceTypeKitInformation::deviceTypeId(runConfig->target()->kit()) == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) @@ -3663,7 +3659,7 @@ void DebuggerUnitTests::testStateMachine() auto runControl = new RunControl(rc, ProjectExplorer::Constants::DEBUG_RUN_MODE); auto debugger = new DebuggerRunTool(runControl); - debugger->setInferior(rc->runnable().as<StandardRunnable>()); + debugger->setInferior(rc->runnable()); debugger->setTestCase(TestNoBoundsOfCurrentFunction); connect(debugger, &DebuggerRunTool::stopped, diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp index a58eb5b6c5..093422f5ad 100644 --- a/src/plugins/debugger/debuggerruncontrol.cpp +++ b/src/plugins/debugger/debuggerruncontrol.cpp @@ -44,7 +44,6 @@ #include <projectexplorer/project.h> #include <projectexplorer/projectexplorer.h> #include <projectexplorer/projectexplorericons.h> -#include <projectexplorer/runnables.h> #include <projectexplorer/runconfigurationaspects.h> #include <projectexplorer/session.h> #include <projectexplorer/target.h> @@ -93,7 +92,7 @@ class LocalProcessRunner : public RunWorker Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::LocalProcessRunner) public: - LocalProcessRunner(RunControl *runControl, const StandardRunnable &runnable) + LocalProcessRunner(RunControl *runControl, const Runnable &runnable) : RunWorker(runControl), m_runnable(runnable) { connect(&m_proc, &QProcess::errorOccurred, @@ -177,7 +176,7 @@ public: Core::AsynchronousMessageBox::critical(tr("Error"), msg); } - StandardRunnable m_runnable; + Runnable m_runnable; Utils::QtcProcess m_proc; }; @@ -395,7 +394,7 @@ void DebuggerRunTool::setServerStartScript(const QString &serverStartScript) { if (!serverStartScript.isEmpty()) { // Provide script information about the environment - StandardRunnable serverStarter; + Runnable serverStarter; serverStarter.executable = serverStartScript; QtcProcess::addArg(&serverStarter.commandLineArguments, m_runParameters.inferior.executable); QtcProcess::addArg(&serverStarter.commandLineArguments, m_runParameters.remoteChannel); @@ -435,8 +434,7 @@ void DebuggerRunTool::setOverrideStartScript(const QString &script) void DebuggerRunTool::setInferior(const Runnable &runnable) { - QTC_ASSERT(runnable.is<StandardRunnable>(), reportFailure(); return); - m_runParameters.inferior = runnable.as<StandardRunnable>(); + m_runParameters.inferior = runnable; setUseTerminal(m_runParameters.inferior.runMode == ApplicationLauncher::Console); } @@ -852,14 +850,11 @@ DebuggerRunTool::DebuggerRunTool(RunControl *runControl, Kit *kit, bool allowTer if (m_runParameters.isCppDebugging) m_runParameters.cppEngineType = DebuggerKitInformation::engineType(kit); - Runnable r = runnable(); - if (r.is<StandardRunnable>()) { - m_runParameters.inferior = r.as<StandardRunnable>(); - // Normalize to work around QTBUG-17529 (QtDeclarative fails with 'File name case mismatch'...) - m_runParameters.inferior.workingDirectory = - FileUtils::normalizePathName(m_runParameters.inferior.workingDirectory); - setUseTerminal(allowTerminal && m_runParameters.inferior.runMode == ApplicationLauncher::Console); - } + m_runParameters.inferior = runnable(); + // Normalize to work around QTBUG-17529 (QtDeclarative fails with 'File name case mismatch'...) + m_runParameters.inferior.workingDirectory = + FileUtils::normalizePathName(m_runParameters.inferior.workingDirectory); + setUseTerminal(allowTerminal && m_runParameters.inferior.runMode == ApplicationLauncher::Console); const QByteArray envBinary = qgetenv("QTC_DEBUGGER_PATH"); if (!envBinary.isEmpty()) @@ -1005,8 +1000,7 @@ GdbServerRunner::GdbServerRunner(RunControl *runControl, GdbServerPortsGatherer : SimpleTargetRunner(runControl), m_portsGatherer(portsGatherer) { setDisplayName("GdbServerRunner"); - if (runControl->runnable().is<StandardRunnable>()) - m_runnable = runControl->runnable().as<StandardRunnable>(); + m_runnable = runControl->runnable(); addStartDependency(m_portsGatherer); } @@ -1014,7 +1008,7 @@ GdbServerRunner::~GdbServerRunner() { } -void GdbServerRunner::setRunnable(const StandardRunnable &runnable) +void GdbServerRunner::setRunnable(const Runnable &runnable) { m_runnable = runnable; } @@ -1033,7 +1027,7 @@ void GdbServerRunner::start() { QTC_ASSERT(m_portsGatherer, reportFailure(); return); - StandardRunnable gdbserver; + Runnable gdbserver; gdbserver.environment = m_runnable.environment; gdbserver.workingDirectory = m_runnable.workingDirectory; diff --git a/src/plugins/debugger/debuggerruncontrol.h b/src/plugins/debugger/debuggerruncontrol.h index b7f7a46882..dd42db024a 100644 --- a/src/plugins/debugger/debuggerruncontrol.h +++ b/src/plugins/debugger/debuggerruncontrol.h @@ -181,7 +181,7 @@ public: ~GdbServerRunner() override; - void setRunnable(const ProjectExplorer::StandardRunnable &runnable); + void setRunnable(const ProjectExplorer::Runnable &runnable); void setUseMulti(bool on); void setAttachPid(Utils::ProcessHandle pid); @@ -189,7 +189,7 @@ private: void start() override; GdbServerPortsGatherer *m_portsGatherer; - ProjectExplorer::StandardRunnable m_runnable; + ProjectExplorer::Runnable m_runnable; Utils::ProcessHandle m_pid; bool m_useMulti = true; }; diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index dc0af46083..65f7708235 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -4832,7 +4832,7 @@ static QString findExecutableFromName(const QString &fileNameFromCore, const QSt return QString(); } -CoreInfo CoreInfo::readExecutableNameFromCore(const StandardRunnable &debugger, const QString &coreFile) +CoreInfo CoreInfo::readExecutableNameFromCore(const Runnable &debugger, const QString &coreFile) { CoreInfo cinfo; #if 0 diff --git a/src/plugins/debugger/gdb/gdbengine.h b/src/plugins/debugger/gdb/gdbengine.h index fb5b95279e..d2ccfb8816 100644 --- a/src/plugins/debugger/gdb/gdbengine.h +++ b/src/plugins/debugger/gdb/gdbengine.h @@ -61,7 +61,7 @@ struct CoreInfo QString foundExecutableName; // empty if no corresponding exec could be found bool isCore = false; - static CoreInfo readExecutableNameFromCore(const ProjectExplorer::StandardRunnable &debugger, + static CoreInfo readExecutableNameFromCore(const ProjectExplorer::Runnable &debugger, const QString &coreFile); }; diff --git a/src/plugins/debugger/loadcoredialog.cpp b/src/plugins/debugger/loadcoredialog.cpp index 8b0b1bf271..8a969d4667 100644 --- a/src/plugins/debugger/loadcoredialog.cpp +++ b/src/plugins/debugger/loadcoredialog.cpp @@ -363,7 +363,7 @@ void AttachCoreDialog::coreFileChanged(const QString &core) if (!HostOsInfo::isWindowsHost() && QFile::exists(core)) { Kit *k = d->kitChooser->currentKit(); QTC_ASSERT(k, return); - StandardRunnable debugger = DebuggerKitInformation::runnable(k); + Runnable debugger = DebuggerKitInformation::runnable(k); CoreInfo cinfo = CoreInfo::readExecutableNameFromCore(debugger, core); if (!cinfo.foundExecutableName.isEmpty()) d->localExecFileName->setFileName(FileName::fromString(cinfo.foundExecutableName)); diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp index b428a88ea3..0d607fc8ec 100644 --- a/src/plugins/debugger/qml/qmlengine.cpp +++ b/src/plugins/debugger/qml/qmlengine.cpp @@ -48,7 +48,6 @@ #include <coreplugin/icore.h> #include <projectexplorer/applicationlauncher.h> -#include <projectexplorer/runnables.h> #include <qmljseditor/qmljseditorconstants.h> #include <qmljs/qmljsmodelmanagerinterface.h> @@ -526,7 +525,7 @@ void QmlEngine::runEngine() void QmlEngine::startApplicationLauncher() { if (!d->applicationLauncher.isRunning()) { - StandardRunnable runnable = runParameters().inferior; + const Runnable runnable = runParameters().inferior; runTool()->appendMessage(tr("Starting %1 %2").arg( QDir::toNativeSeparators(runnable.executable), runnable.commandLineArguments), diff --git a/src/plugins/debugger/terminal.h b/src/plugins/debugger/terminal.h index 1500193a15..509c8350e3 100644 --- a/src/plugins/debugger/terminal.h +++ b/src/plugins/debugger/terminal.h @@ -29,7 +29,6 @@ #include <QSocketNotifier> #include <projectexplorer/runconfiguration.h> -#include <projectexplorer/runnables.h> #include <utils/consoleprocess.h> @@ -85,7 +84,7 @@ private: void stubError(const QString &msg); Utils::ConsoleProcess m_stubProc; - ProjectExplorer::StandardRunnable m_stubRunnable; + ProjectExplorer::Runnable m_stubRunnable; qint64 m_applicationPid = 0; qint64 m_applicationMainThreadId = 0; }; diff --git a/src/plugins/debugger/unstartedappwatcherdialog.cpp b/src/plugins/debugger/unstartedappwatcherdialog.cpp index 1899b928bb..bca9a442e6 100644 --- a/src/plugins/debugger/unstartedappwatcherdialog.cpp +++ b/src/plugins/debugger/unstartedappwatcherdialog.cpp @@ -38,7 +38,6 @@ #include <projectexplorer/projecttree.h> #include <projectexplorer/runconfiguration.h> #include <projectexplorer/buildconfiguration.h> -#include <projectexplorer/runnables.h> #include <QVBoxLayout> #include <QHBoxLayout> @@ -116,11 +115,10 @@ UnstartedAppWatcherDialog::UnstartedAppWatcherDialog(QWidget *parent) if (activeTarget) { if (RunConfiguration *runConfig = activeTarget->activeRunConfiguration()) { const Runnable runnable = runConfig->runnable(); - if (runnable.is<StandardRunnable>() && isLocal(runConfig)) { + if (isLocal(runConfig)) { resetExecutable->setEnabled(true); - connect(resetExecutable, &QPushButton::clicked, - this, [this, runnable]() { - m_pathChooser->setPath(runnable.as<StandardRunnable>().executable); + connect(resetExecutable, &QPushButton::clicked, this, [this, runnable] { + m_pathChooser->setPath(runnable.executable); }); } } @@ -198,8 +196,8 @@ void UnstartedAppWatcherDialog::selectExecutable() if (activeTarget) { if (RunConfiguration *runConfig = activeTarget->activeRunConfiguration()) { const Runnable runnable = runConfig->runnable(); - if (runnable.is<StandardRunnable>() && isLocal(runConfig)) - path = QFileInfo(runnable.as<StandardRunnable>().executable).path(); + if (isLocal(runConfig)) + path = QFileInfo(runnable.executable).path(); } } diff --git a/src/plugins/ios/iosrunner.cpp b/src/plugins/ios/iosrunner.cpp index 0246bd1117..136647d3b4 100644 --- a/src/plugins/ios/iosrunner.cpp +++ b/src/plugins/ios/iosrunner.cpp @@ -384,7 +384,7 @@ IosQmlProfilerSupport::IosQmlProfilerSupport(RunControl *runControl) setDisplayName("IosAnalyzeSupport"); auto iosRunConfig = qobject_cast<IosRunConfiguration *>(runControl->runConfiguration()); - StandardRunnable runnable; + Runnable runnable; runnable.executable = iosRunConfig->localExecutable().toUserOutput(); runnable.commandLineArguments = iosRunConfig->extraAspect<ArgumentsAspect>()->arguments(); runControl->setDisplayName(iosRunConfig->applicationName()); diff --git a/src/plugins/nim/project/nimrunconfiguration.cpp b/src/plugins/nim/project/nimrunconfiguration.cpp index 715053392d..3d84c40949 100644 --- a/src/plugins/nim/project/nimrunconfiguration.cpp +++ b/src/plugins/nim/project/nimrunconfiguration.cpp @@ -28,7 +28,6 @@ #include "../nimconstants.h" -#include <projectexplorer/runnables.h> #include <projectexplorer/localenvironmentaspect.h> #include <projectexplorer/runconfigurationaspects.h> diff --git a/src/plugins/projectexplorer/applicationlauncher.cpp b/src/plugins/projectexplorer/applicationlauncher.cpp index f03276af4a..d42109d2b4 100644 --- a/src/plugins/projectexplorer/applicationlauncher.cpp +++ b/src/plugins/projectexplorer/applicationlauncher.cpp @@ -39,7 +39,6 @@ #include "devicesupport/deviceprocess.h" #include "projectexplorer.h" #include "projectexplorersettings.h" -#include "runnables.h" #include <QTextCodec> #include <QTimer> @@ -365,15 +364,12 @@ void ApplicationLauncherPrivate::start(const Runnable &runnable, const IDevice:: m_isLocal = local; if (m_isLocal) { - QTC_ASSERT(runnable.is<StandardRunnable>(), return); - StandardRunnable stdRunnable = runnable.as<StandardRunnable>(); - // Work around QTBUG-17529 (QtDeclarative fails with 'File name case mismatch' ...) - const QString fixedPath = FileUtils::normalizePathName(stdRunnable.workingDirectory); + const QString fixedPath = FileUtils::normalizePathName(runnable.workingDirectory); m_guiProcess.setWorkingDirectory(fixedPath); m_consoleProcess.setWorkingDirectory(fixedPath); - m_guiProcess.setEnvironment(stdRunnable.environment); - m_consoleProcess.setEnvironment(stdRunnable.environment); + m_guiProcess.setEnvironment(runnable.environment); + m_consoleProcess.setEnvironment(runnable.environment); m_processRunning = true; #ifdef Q_OS_WIN @@ -381,13 +377,13 @@ void ApplicationLauncherPrivate::start(const Runnable &runnable, const IDevice:: WinDebugInterface::instance()->start(); // Try to start listener again... #endif - m_currentMode = stdRunnable.runMode; + m_currentMode = runnable.runMode; if (m_currentMode == ApplicationLauncher::Gui) { - m_guiProcess.setCommand(stdRunnable.executable, stdRunnable.commandLineArguments); + m_guiProcess.setCommand(runnable.executable, runnable.commandLineArguments); m_guiProcess.closeWriteChannel(); m_guiProcess.start(); } else { - m_consoleProcess.start(stdRunnable.executable, stdRunnable.commandLineArguments); + m_consoleProcess.start(runnable.executable, runnable.commandLineArguments); } } else { QTC_ASSERT(m_state == Inactive, return); @@ -405,7 +401,7 @@ void ApplicationLauncherPrivate::start(const Runnable &runnable, const IDevice:: return; } - if (runnable.is<StandardRunnable>() && runnable.as<StandardRunnable>().executable.isEmpty()) { + if (runnable.executable.isEmpty()) { doReportError(ApplicationLauncher::tr("Cannot run: No command given.")); setFinished(); return; diff --git a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp index da6e50df4b..4d248bd43d 100644 --- a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp +++ b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp @@ -250,7 +250,7 @@ Runnable CustomExecutableRunConfiguration::runnable() const { FileName workingDirectory = extraAspect<WorkingDirectoryAspect>()->workingDirectory(); - StandardRunnable r; + Runnable r; r.executable = extraAspect<ExecutableAspect>()->executable().toString(); r.commandLineArguments = extraAspect<ArgumentsAspect>()->arguments(); r.environment = extraAspect<EnvironmentAspect>()->environment(); diff --git a/src/plugins/projectexplorer/customexecutablerunconfiguration.h b/src/plugins/projectexplorer/customexecutablerunconfiguration.h index 14422a7c0f..c8b9d8144b 100644 --- a/src/plugins/projectexplorer/customexecutablerunconfiguration.h +++ b/src/plugins/projectexplorer/customexecutablerunconfiguration.h @@ -28,7 +28,6 @@ #include "projectexplorer_global.h" #include "projectexplorer/runconfigurationaspects.h" -#include "projectexplorer/runnables.h" namespace ProjectExplorer { diff --git a/src/plugins/projectexplorer/devicesupport/desktopdevice.cpp b/src/plugins/projectexplorer/devicesupport/desktopdevice.cpp index 6c2f5c2419..f779d1eba4 100644 --- a/src/plugins/projectexplorer/devicesupport/desktopdevice.cpp +++ b/src/plugins/projectexplorer/devicesupport/desktopdevice.cpp @@ -32,7 +32,6 @@ #include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/runconfiguration.h> -#include <projectexplorer/runnables.h> #include <ssh/sshconnection.h> @@ -155,7 +154,7 @@ class DesktopPortsGatheringMethod : public PortsGatheringMethod Q_UNUSED(protocol) - StandardRunnable runnable; + Runnable runnable; if (HostOsInfo::isWindowsHost() || HostOsInfo::isMacHost()) { runnable.executable = "netstat"; runnable.commandLineArguments = "-a -n"; diff --git a/src/plugins/projectexplorer/devicesupport/desktopdeviceprocess.cpp b/src/plugins/projectexplorer/devicesupport/desktopdeviceprocess.cpp index f037a6de59..e87c2ed4f4 100644 --- a/src/plugins/projectexplorer/devicesupport/desktopdeviceprocess.cpp +++ b/src/plugins/projectexplorer/devicesupport/desktopdeviceprocess.cpp @@ -26,7 +26,7 @@ #include "desktopdeviceprocess.h" #include "idevice.h" -#include "../runnables.h" +#include "../runconfiguration.h" #include <utils/environment.h> #include <utils/qtcassert.h> @@ -51,12 +51,11 @@ DesktopDeviceProcess::DesktopDeviceProcess(const QSharedPointer<const IDevice> & void DesktopDeviceProcess::start(const Runnable &runnable) { - QTC_ASSERT(runnable.is<StandardRunnable>(), return); QTC_ASSERT(m_process.state() == QProcess::NotRunning, return); - auto r = runnable.as<StandardRunnable>(); - m_process.setProcessEnvironment(r.environment.toProcessEnvironment()); - m_process.setWorkingDirectory(r.workingDirectory); - m_process.start(r.executable, Utils::QtcProcess::splitArgs(r.commandLineArguments)); + m_process.setProcessEnvironment(runnable.environment.toProcessEnvironment()); + m_process.setWorkingDirectory(runnable.workingDirectory); + m_process.start(runnable.executable, + Utils::QtcProcess::splitArgs(runnable.commandLineArguments)); } void DesktopDeviceProcess::interrupt() diff --git a/src/plugins/projectexplorer/devicesupport/deviceusedportsgatherer.cpp b/src/plugins/projectexplorer/devicesupport/deviceusedportsgatherer.cpp index fbe7516c9b..83a36ccbe7 100644 --- a/src/plugins/projectexplorer/devicesupport/deviceusedportsgatherer.cpp +++ b/src/plugins/projectexplorer/devicesupport/deviceusedportsgatherer.cpp @@ -26,8 +26,6 @@ #include "deviceprocess.h" #include "deviceusedportsgatherer.h" -#include <projectexplorer/runnables.h> - #include <ssh/sshconnection.h> #include <utils/port.h> diff --git a/src/plugins/projectexplorer/devicesupport/idevice.cpp b/src/plugins/projectexplorer/devicesupport/idevice.cpp index 00e8c71556..f46095c1f9 100644 --- a/src/plugins/projectexplorer/devicesupport/idevice.cpp +++ b/src/plugins/projectexplorer/devicesupport/idevice.cpp @@ -31,7 +31,6 @@ #include "../kit.h" #include "../kitinformation.h" #include "../runconfiguration.h" -#include "../runnables.h" #include <ssh/sshconnection.h> #include <utils/icon.h> diff --git a/src/plugins/projectexplorer/devicesupport/sshdeviceprocess.cpp b/src/plugins/projectexplorer/devicesupport/sshdeviceprocess.cpp index 83ff88af38..b34e0ce805 100644 --- a/src/plugins/projectexplorer/devicesupport/sshdeviceprocess.cpp +++ b/src/plugins/projectexplorer/devicesupport/sshdeviceprocess.cpp @@ -26,7 +26,7 @@ #include "sshdeviceprocess.h" #include "idevice.h" -#include "../runnables.h" +#include "../runconfiguration.h" #include <ssh/sshconnection.h> #include <ssh/sshconnectionmanager.h> @@ -48,7 +48,7 @@ public: bool serverSupportsSignals = false; QSsh::SshConnection *connection = nullptr; QSsh::SshRemoteProcess::Ptr process; - StandardRunnable runnable; + Runnable runnable; QString errorMessage; QSsh::SshRemoteProcess::ExitStatus exitStatus; DeviceProcessSignalOperation::Ptr killOperation; @@ -77,16 +77,11 @@ SshDeviceProcess::~SshDeviceProcess() void SshDeviceProcess::start(const Runnable &runnable) { QTC_ASSERT(d->state == SshDeviceProcessPrivate::Inactive, return); - if (!runnable.is<StandardRunnable>()) { - d->errorMessage = tr("Internal error"); - error(QProcess::FailedToStart); - return; - } d->setState(SshDeviceProcessPrivate::Connecting); d->errorMessage.clear(); d->exitCode = -1; - d->runnable = runnable.as<StandardRunnable>(); + d->runnable = runnable; d->connection = QSsh::acquireConnection(device()->sshParameters()); connect(d->connection, &QSsh::SshConnection::error, this, &SshDeviceProcess::handleConnectionError); diff --git a/src/plugins/projectexplorer/localenvironmentaspect.cpp b/src/plugins/projectexplorer/localenvironmentaspect.cpp index 04d7814ef4..6fba5e0b7b 100644 --- a/src/plugins/projectexplorer/localenvironmentaspect.cpp +++ b/src/plugins/projectexplorer/localenvironmentaspect.cpp @@ -27,7 +27,6 @@ #include "buildconfiguration.h" #include "environmentaspectwidget.h" -#include "runnables.h" #include "kit.h" #include "target.h" diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index ad5496e6e9..99af2ba885 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -649,9 +649,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er auto constraint = [](RunConfiguration *runConfiguration) { const Runnable runnable = runConfiguration->runnable(); - if (!runnable.is<StandardRunnable>()) - return false; - const IDevice::ConstPtr device = runnable.as<StandardRunnable>().device; + const IDevice::ConstPtr device = runnable.device; if (device && device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) return true; Target *target = runConfiguration->target(); @@ -1484,10 +1482,8 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er tr("The currently active run configuration's executable (if applicable)."), []() -> QString { if (Target *target = activeTarget()) { - if (RunConfiguration *rc = target->activeRunConfiguration()) { - if (rc->runnable().is<StandardRunnable>()) - return rc->runnable().as<StandardRunnable>().executable; - } + if (RunConfiguration *rc = target->activeRunConfiguration()) + return rc->runnable().executable; } return QString(); }); @@ -2371,11 +2367,9 @@ int ProjectExplorerPluginPrivate::queue(QList<Project *> projects, QList<Id> ste BuildConfiguration *bc = t ? t->activeBuildConfiguration() : nullptr; if (!bc) return false; - if (!rc->runnable().is<StandardRunnable>()) - return false; - if (!Utils::FileName::fromString(rc->runnable().as<StandardRunnable>().executable).isChildOf(bc->buildDirectory())) + if (!Utils::FileName::fromString(rc->runnable().executable).isChildOf(bc->buildDirectory())) return false; - IDevice::ConstPtr device = rc->runnable().as<StandardRunnable>().device; + IDevice::ConstPtr device = rc->runnable().device; if (device.isNull()) device = DeviceKitInformation::device(t->kit()); return !device.isNull() && device->type() == Core::Id(Constants::DESKTOP_DEVICE_TYPE); diff --git a/src/plugins/projectexplorer/projectexplorer.pro b/src/plugins/projectexplorer/projectexplorer.pro index b9a11dd39b..eecc3f0870 100644 --- a/src/plugins/projectexplorer/projectexplorer.pro +++ b/src/plugins/projectexplorer/projectexplorer.pro @@ -14,7 +14,6 @@ HEADERS += projectexplorer.h \ environmentaspectwidget.h \ gcctoolchain.h \ importwidget.h \ - runnables.h \ userfileaccessor.h \ localenvironmentaspect.h \ osparser.h \ diff --git a/src/plugins/projectexplorer/projectexplorer.qbs b/src/plugins/projectexplorer/projectexplorer.qbs index ac5eaafcde..973423e149 100644 --- a/src/plugins/projectexplorer/projectexplorer.qbs +++ b/src/plugins/projectexplorer/projectexplorer.qbs @@ -119,7 +119,6 @@ Project { "projectwindow.cpp", "projectwindow.h", "projectwizardpage.cpp", "projectwizardpage.h", "projectwizardpage.ui", "removetaskhandler.cpp", "removetaskhandler.h", - "runnables.h", "runconfiguration.cpp", "runconfiguration.h", "runconfigurationaspects.cpp", "runconfigurationaspects.h", "runsettingspropertiespage.cpp", "runsettingspropertiespage.h", diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp index 2bb79ef79f..438d631c78 100644 --- a/src/plugins/projectexplorer/runconfiguration.cpp +++ b/src/plugins/projectexplorer/runconfiguration.cpp @@ -33,7 +33,6 @@ #include "environmentaspect.h" #include "kitinformation.h" #include "runconfigurationaspects.h" -#include "runnables.h" #include "session.h" #include "kitinformation.h" @@ -458,7 +457,7 @@ IRunConfigurationAspect *RunConfiguration::extraAspect(Core::Id id) const Runnable RunConfiguration::runnable() const { - StandardRunnable r; + Runnable r; if (auto aspect = extraAspect<ExecutableAspect>()) r.executable = aspect->executable().toString(); if (auto aspect = extraAspect<ArgumentsAspect>()) @@ -840,8 +839,7 @@ public: runnable = runConfiguration->runnable(); displayName = runConfiguration->displayName(); outputFormatter = runConfiguration->createOutputFormatter(); - if (runnable.is<StandardRunnable>()) - device = runnable.as<StandardRunnable>().device; + device = runnable.device; if (!device) device = DeviceKitInformation::device(runConfiguration->target()->kit()); project = runConfiguration->target()->project(); @@ -1413,7 +1411,10 @@ bool RunControl::canReUseOutputPane(const RunControl *other) const if (!other || other->isRunning()) return false; - return d->runnable.canReUseOutputPane(other->d->runnable); + return d->runnable.executable == other->d->runnable.executable + && d->runnable.commandLineArguments == other->d->runnable.commandLineArguments + && d->runnable.workingDirectory == other->d->runnable.workingDirectory + && d->runnable.environment == other->d->runnable.environment; } /*! @@ -1607,15 +1608,6 @@ void RunControl::appendMessage(const QString &msg, Utils::OutputFormat format) emit appendMessageRequested(this, msg, format); } -bool Runnable::canReUseOutputPane(const Runnable &other) const -{ - return executable == other.executable - && commandLineArguments == other.commandLineArguments - && workingDirectory == other.workingDirectory - && environment == other.environment; -} - - // SimpleTargetRunner SimpleTargetRunner::SimpleTargetRunner(RunControl *runControl) @@ -1651,8 +1643,7 @@ void SimpleTargetRunner::start() connect(&m_launcher, &ApplicationLauncher::error, this, &SimpleTargetRunner::onProcessError); - QTC_ASSERT(m_runnable.is<StandardRunnable>(), return); - const QString executable = m_runnable.as<StandardRunnable>().executable; + const QString executable = m_runnable.executable; if (executable.isEmpty()) { reportFailure(RunControl::tr("No executable specified.")); } else { diff --git a/src/plugins/projectexplorer/runconfiguration.h b/src/plugins/projectexplorer/runconfiguration.h index d05086c3c0..d26a54cc19 100644 --- a/src/plugins/projectexplorer/runconfiguration.h +++ b/src/plugins/projectexplorer/runconfiguration.h @@ -161,11 +161,6 @@ class PROJECTEXPLORER_EXPORT Runnable public: Runnable() = default; - template <class T> bool is() const { return true; } - template <class T> const T &as() const { return *this; } - - bool canReUseOutputPane(const Runnable &other) const; - QString executable; QString commandLineArguments; QString workingDirectory; diff --git a/src/plugins/projectexplorer/runnables.h b/src/plugins/projectexplorer/runnables.h deleted file mode 100644 index c0ee207ed5..0000000000 --- a/src/plugins/projectexplorer/runnables.h +++ /dev/null @@ -1,34 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -****************************************************************************/ - -#pragma once - -#include "runconfiguration.h" - -namespace ProjectExplorer { - -using StandardRunnable = Runnable; - -} // namespace ProjectExplorer diff --git a/src/plugins/pythoneditor/pythoneditorplugin.cpp b/src/plugins/pythoneditor/pythoneditorplugin.cpp index 782d96049b..f3375a67c9 100644 --- a/src/plugins/pythoneditor/pythoneditorplugin.cpp +++ b/src/plugins/pythoneditor/pythoneditorplugin.cpp @@ -43,7 +43,6 @@ #include <projectexplorer/project.h> #include <projectexplorer/projectmanager.h> #include <projectexplorer/projectnodes.h> -#include <projectexplorer/runnables.h> #include <projectexplorer/target.h> #include <projectexplorer/task.h> #include <projectexplorer/taskhub.h> @@ -296,7 +295,7 @@ void PythonRunConfiguration::fillConfigurationLayout(QFormLayout *layout) const Runnable PythonRunConfiguration::runnable() const { - StandardRunnable r; + Runnable r; QtcProcess::addArg(&r.commandLineArguments, mainScript()); QtcProcess::addArgs(&r.commandLineArguments, extraAspect<ArgumentsAspect>()->arguments()); r.executable = extraAspect<InterpreterAspect>()->value(); diff --git a/src/plugins/qbsprojectmanager/qbsrunconfiguration.h b/src/plugins/qbsprojectmanager/qbsrunconfiguration.h index 36d3a3a256..94b3ae6535 100644 --- a/src/plugins/qbsprojectmanager/qbsrunconfiguration.h +++ b/src/plugins/qbsprojectmanager/qbsrunconfiguration.h @@ -25,7 +25,7 @@ #pragma once -#include <projectexplorer/runnables.h> +#include <projectexplorer/runconfiguration.h> #include <QHash> #include <QPair> diff --git a/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp b/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp index d8a971fa8b..57830403ca 100644 --- a/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp +++ b/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp @@ -30,7 +30,6 @@ #include <projectexplorer/localenvironmentaspect.h> #include <projectexplorer/project.h> #include <projectexplorer/projectnodes.h> -#include <projectexplorer/runnables.h> #include <projectexplorer/runconfigurationaspects.h> #include <projectexplorer/target.h> diff --git a/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.h b/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.h index 685cda6456..d5cb6a8d3a 100644 --- a/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.h +++ b/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.h @@ -26,7 +26,6 @@ #pragma once #include <projectexplorer/runconfiguration.h> -#include <projectexplorer/runnables.h> #include <utils/fileutils.h> diff --git a/src/plugins/qmljseditor/qmljspreviewrunner.cpp b/src/plugins/qmljseditor/qmljspreviewrunner.cpp index 31b9270eb4..5d829098ec 100644 --- a/src/plugins/qmljseditor/qmljspreviewrunner.cpp +++ b/src/plugins/qmljseditor/qmljspreviewrunner.cpp @@ -27,7 +27,7 @@ #include <coreplugin/icore.h> -#include <projectexplorer/runnables.h> +#include <projectexplorer/runconfiguration.h> #include <utils/environment.h> #include <utils/hostosinfo.h> @@ -59,7 +59,7 @@ void QmlJSPreviewRunner::run(const QString &filename) { QString errorMessage; if (!filename.isEmpty()) { - ProjectExplorer::StandardRunnable r; + ProjectExplorer::Runnable r; r.environment = Utils::Environment::systemEnvironment(); r.runMode = ProjectExplorer::ApplicationLauncher::Gui; r.executable = m_qmlViewerDefaultPath; diff --git a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp index 98345f8e6f..18688ce367 100644 --- a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp @@ -35,7 +35,6 @@ #include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/projectexplorericons.h> #include <projectexplorer/runconfiguration.h> -#include <projectexplorer/runnables.h> #include <projectexplorer/target.h> #include <qtsupport/baseqtversion.h> @@ -244,7 +243,7 @@ LocalQmlProfilerSupport::LocalQmlProfilerSupport(QmlProfilerTool *profilerTool, // In the TCP case, it doesn't hurt either to start the profiler before. addStartDependency(m_profiler); - StandardRunnable debuggee = runnable().as<StandardRunnable>(); + Runnable debuggee = runnable(); QString code; if (serverUrl.scheme() == Utils::urlSocketScheme()) diff --git a/src/plugins/qmlprofiler/qmlprofilerruncontrol.h b/src/plugins/qmlprofiler/qmlprofilerruncontrol.h index 1236961049..c9c9c5b38a 100644 --- a/src/plugins/qmlprofiler/qmlprofilerruncontrol.h +++ b/src/plugins/qmlprofiler/qmlprofilerruncontrol.h @@ -28,7 +28,6 @@ #include "qmlprofilerstatemanager.h" #include <projectexplorer/runconfiguration.h> -#include <projectexplorer/runnables.h> #include <utils/outputformat.h> #include <utils/port.h> diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp index 3325284830..1dad4de1ee 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp @@ -54,7 +54,6 @@ #include <projectexplorer/target.h> #include <projectexplorer/session.h> #include <projectexplorer/kitinformation.h> -#include <projectexplorer/runnables.h> #include <projectexplorer/taskhub.h> #include <texteditor/texteditor.h> diff --git a/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp b/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp index 2ee5906935..2181dfbd33 100644 --- a/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp +++ b/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp @@ -26,7 +26,7 @@ #include "localqmlprofilerrunner_test.h" #include <debugger/analyzer/analyzermanager.h> -#include <projectexplorer/runnables.h> + #include <qmlprofiler/qmlprofilerruncontrol.h> #include <qmlprofiler/qmlprofilertool.h> @@ -48,7 +48,7 @@ void LocalQmlProfilerRunnerTest::testRunner() QmlProfilerTool tool; QPointer<ProjectExplorer::RunControl> runControl; QPointer<LocalQmlProfilerSupport> profiler; - ProjectExplorer::StandardRunnable debuggee; + ProjectExplorer::Runnable debuggee; QUrl serverUrl; bool running = false; diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp index 4f6336b90c..cc9fdb2168 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp @@ -74,7 +74,7 @@ QmlProjectRunConfiguration::QmlProjectRunConfiguration(Target *target, Id id) Runnable QmlProjectRunConfiguration::runnable() const { - StandardRunnable r; + Runnable r; r.executable = executable(); r.commandLineArguments = commandLineArguments(); r.runMode = ApplicationLauncher::Gui; diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.h b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.h index 5c6d1dca47..6adc5de404 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.h +++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.h @@ -27,7 +27,7 @@ #include "qmlprojectmanager_global.h" -#include <projectexplorer/runnables.h> +#include <projectexplorer/runconfiguration.h> namespace Core { class IEditor; } diff --git a/src/plugins/qnx/qnxanalyzesupport.cpp b/src/plugins/qnx/qnxanalyzesupport.cpp index fa6a61b267..85a5cf8cc0 100644 --- a/src/plugins/qnx/qnxanalyzesupport.cpp +++ b/src/plugins/qnx/qnxanalyzesupport.cpp @@ -31,7 +31,6 @@ #include <projectexplorer/devicesupport/deviceusedportsgatherer.h> #include <projectexplorer/kitinformation.h> -#include <projectexplorer/runnables.h> #include <projectexplorer/target.h> #include <utils/qtcassert.h> @@ -75,7 +74,7 @@ void QnxQmlProfilerSupport::start() serverUrl.setScheme("tcp"); m_profiler->recordData("QmlServerUrl", serverUrl); - auto r = runnable().as<StandardRunnable>(); + Runnable r = runnable(); QtcProcess::addArg(&r.commandLineArguments, QmlDebug::qmlDebugTcpArguments(QmlDebug::QmlProfilerServices, qmlPort), device()->osType()); diff --git a/src/plugins/qnx/qnxdebugsupport.cpp b/src/plugins/qnx/qnxdebugsupport.cpp index 95284459e8..bb7b8097d8 100644 --- a/src/plugins/qnx/qnxdebugsupport.cpp +++ b/src/plugins/qnx/qnxdebugsupport.cpp @@ -46,7 +46,6 @@ #include <projectexplorer/kitinformation.h> #include <projectexplorer/projectexplorer.h> #include <projectexplorer/runconfigurationaspects.h> -#include <projectexplorer/runnables.h> #include <projectexplorer/target.h> #include <projectexplorer/toolchain.h> @@ -106,7 +105,7 @@ public: private: void start() final { - StandardRunnable r = runnable().as<StandardRunnable>(); + Runnable r = runnable(); QStringList arguments; if (m_portsGatherer->useGdbServer()) { Port pdebugPort = m_portsGatherer->gdbServerPort(); @@ -212,7 +211,7 @@ private: { Port pdebugPort = m_portsGatherer->gdbServerPort(); - StandardRunnable r; + Runnable r; r.executable = Constants::QNX_DEBUG_EXECUTABLE; r.commandLineArguments = pdebugPort.toString(); setRunnable(r); diff --git a/src/plugins/qnx/qnxdevice.cpp b/src/plugins/qnx/qnxdevice.cpp index 01d6fec0f4..05a93c5179 100644 --- a/src/plugins/qnx/qnxdevice.cpp +++ b/src/plugins/qnx/qnxdevice.cpp @@ -31,7 +31,7 @@ #include "qnxdeviceprocess.h" #include <projectexplorer/devicesupport/sshdeviceprocess.h> -#include <projectexplorer/runnables.h> + #include <ssh/sshconnection.h> #include <utils/port.h> #include <utils/qtcassert.h> @@ -59,7 +59,7 @@ class QnxPortsGatheringMethod : public PortsGatheringMethod Runnable runnable(QAbstractSocket::NetworkLayerProtocol protocol) const override { Q_UNUSED(protocol); - StandardRunnable runnable; + Runnable runnable; runnable.executable = "netstat"; runnable.commandLineArguments = "-na"; return runnable; @@ -131,7 +131,7 @@ void QnxDevice::updateVersionNumber() const QObject::connect(&versionNumberProcess, &SshDeviceProcess::finished, &eventLoop, &QEventLoop::quit); QObject::connect(&versionNumberProcess, &DeviceProcess::error, &eventLoop, &QEventLoop::quit); - StandardRunnable r; + Runnable r; r.executable = QLatin1String("uname"); r.commandLineArguments = QLatin1String("-r"); versionNumberProcess.start(r); diff --git a/src/plugins/qnx/qnxdeviceprocess.cpp b/src/plugins/qnx/qnxdeviceprocess.cpp index f96817946c..5a2b5ecfd3 100644 --- a/src/plugins/qnx/qnxdeviceprocess.cpp +++ b/src/plugins/qnx/qnxdeviceprocess.cpp @@ -26,7 +26,7 @@ #include "qnxdeviceprocess.h" #include <projectexplorer/devicesupport/sshdeviceprocess.h> -#include <projectexplorer/runnables.h> + #include <utils/qtcprocess.h> using namespace ProjectExplorer; @@ -69,7 +69,7 @@ QString QnxDeviceProcess::fullCommandLine(const Runnable &runnable) const void QnxDeviceProcess::doSignal(int sig) { auto signaler = new SshDeviceProcess(device(), this); - StandardRunnable r; + Runnable r; r.executable = QString::fromLatin1("kill -%2 `cat %1`").arg(m_pidFile).arg(sig); connect(signaler, &SshDeviceProcess::finished, signaler, &QObject::deleteLater); signaler->start(r); diff --git a/src/plugins/qnx/qnxrunconfiguration.cpp b/src/plugins/qnx/qnxrunconfiguration.cpp index 9d8254778b..19d14cbbbe 100644 --- a/src/plugins/qnx/qnxrunconfiguration.cpp +++ b/src/plugins/qnx/qnxrunconfiguration.cpp @@ -27,8 +27,6 @@ #include "qnxconstants.h" -#include <projectexplorer/runnables.h> - using namespace ProjectExplorer; using namespace RemoteLinux; @@ -46,7 +44,7 @@ QnxRunConfiguration::QnxRunConfiguration(Target *target, Core::Id id) Runnable QnxRunConfiguration::runnable() const { - auto r = RemoteLinuxRunConfiguration::runnable().as<StandardRunnable>(); + Runnable r = RemoteLinuxRunConfiguration::runnable(); QString libPath = extraAspect<QtLibPathAspect>()->value(); if (!libPath.isEmpty()) { r.environment.appendOrSet("LD_LIBRARY_PATH", libPath + "/lib:$LD_LIBRARY_PATH"); diff --git a/src/plugins/qnx/slog2inforunner.cpp b/src/plugins/qnx/slog2inforunner.cpp index 8fd0e541b5..0d64940163 100644 --- a/src/plugins/qnx/slog2inforunner.cpp +++ b/src/plugins/qnx/slog2inforunner.cpp @@ -30,7 +30,6 @@ #include "qnxrunconfiguration.h" #include <projectexplorer/runconfigurationaspects.h> -#include <projectexplorer/runnables.h> #include <utils/qtcassert.h> @@ -73,7 +72,7 @@ void Slog2InfoRunner::printMissingWarning() void Slog2InfoRunner::start() { - StandardRunnable r; + Runnable r; r.executable = QLatin1String("slog2info"); m_testProcess->start(r); reportStarted(); @@ -111,7 +110,7 @@ void Slog2InfoRunner::handleTestProcessCompleted() void Slog2InfoRunner::readLaunchTime() { - StandardRunnable r; + Runnable r; r.executable = QLatin1String("date"); r.commandLineArguments = QLatin1String("+\"%d %H:%M:%S\""); m_launchDateTimeProcess->start(r); @@ -128,7 +127,7 @@ void Slog2InfoRunner::launchSlog2Info() m_launchDateTime = QDateTime::fromString(QString::fromLatin1(m_launchDateTimeProcess->readAllStandardOutput()).trimmed(), QString::fromLatin1("dd HH:mm:ss")); - StandardRunnable r; + Runnable r; r.executable = QLatin1String("slog2info"); r.commandLineArguments = QLatin1String("-w"); m_logProcess->start(r); diff --git a/src/plugins/remotelinux/linuxdevice.cpp b/src/plugins/remotelinux/linuxdevice.cpp index 0e783a1a19..f19350ca1f 100644 --- a/src/plugins/remotelinux/linuxdevice.cpp +++ b/src/plugins/remotelinux/linuxdevice.cpp @@ -35,7 +35,7 @@ #include <coreplugin/id.h> #include <projectexplorer/devicesupport/sshdeviceprocesslist.h> -#include <projectexplorer/runnables.h> +#include <projectexplorer/runconfiguration.h> #include <ssh/sshremoteprocessrunner.h> #include <utils/algorithm.h> #include <utils/port.h> @@ -136,7 +136,7 @@ class LinuxPortsGatheringMethod : public PortsGatheringMethod Q_UNUSED(protocol) // /proc/net/tcp* covers /proc/net/tcp and /proc/net/tcp6 - StandardRunnable runnable; + Runnable runnable; runnable.executable = "sed"; runnable.commandLineArguments = "-e 's/.*: [[:xdigit:]]*:\\([[:xdigit:]]\\{4\\}\\).*/\\1/g' /proc/net/tcp*"; return runnable; diff --git a/src/plugins/remotelinux/linuxdeviceprocess.cpp b/src/plugins/remotelinux/linuxdeviceprocess.cpp index a58d404e10..11f8624b9a 100644 --- a/src/plugins/remotelinux/linuxdeviceprocess.cpp +++ b/src/plugins/remotelinux/linuxdeviceprocess.cpp @@ -25,7 +25,7 @@ #include "linuxdeviceprocess.h" -#include <projectexplorer/runnables.h> +#include <projectexplorer/runconfiguration.h> #include <utils/environment.h> #include <utils/qtcprocess.h> diff --git a/src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp b/src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp index a44b9ecd4e..76236c47fc 100644 --- a/src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp +++ b/src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp @@ -28,7 +28,6 @@ #include "remotelinux_constants.h" #include "remotelinuxenvironmentaspect.h" -#include <projectexplorer/runnables.h> #include <projectexplorer/runconfigurationaspects.h> #include <projectexplorer/target.h> diff --git a/src/plugins/remotelinux/remotelinuxenvironmentreader.cpp b/src/plugins/remotelinux/remotelinuxenvironmentreader.cpp index 81bca05e97..18a265c886 100644 --- a/src/plugins/remotelinux/remotelinuxenvironmentreader.cpp +++ b/src/plugins/remotelinux/remotelinuxenvironmentreader.cpp @@ -27,7 +27,7 @@ #include <projectexplorer/devicesupport/deviceprocess.h> #include <projectexplorer/devicesupport/idevice.h> -#include <projectexplorer/runnables.h> +#include <projectexplorer/runconfiguration.h> using namespace ProjectExplorer; @@ -57,7 +57,7 @@ void RemoteLinuxEnvironmentReader::start() this, &RemoteLinuxEnvironmentReader::handleError); connect(m_deviceProcess, &DeviceProcess::finished, this, &RemoteLinuxEnvironmentReader::remoteProcessFinished); - StandardRunnable runnable; + Runnable runnable; runnable.executable = QLatin1String("env"); m_deviceProcess->start(runnable); } diff --git a/src/plugins/remotelinux/remotelinuxkillappstep.cpp b/src/plugins/remotelinux/remotelinuxkillappstep.cpp index 050532ba3a..bdf3972a7b 100644 --- a/src/plugins/remotelinux/remotelinuxkillappstep.cpp +++ b/src/plugins/remotelinux/remotelinuxkillappstep.cpp @@ -28,7 +28,6 @@ #include "remotelinuxkillappservice.h" #include <projectexplorer/runconfiguration.h> -#include <projectexplorer/runnables.h> #include <projectexplorer/target.h> #include <utils/qtcassert.h> @@ -55,9 +54,7 @@ bool RemoteLinuxKillAppStep::initInternal(QString *error) Target * const theTarget = target(); QTC_ASSERT(theTarget, return false); RunConfiguration * const rc = theTarget->activeRunConfiguration(); - const QString remoteExe = rc && rc->runnable().is<StandardRunnable>() - ? rc->runnable().as<StandardRunnable>().executable - : QString(); + const QString remoteExe = rc ? rc->runnable().executable : QString(); m_service->setRemoteExecutable(remoteExe); return true; } diff --git a/src/plugins/remotelinux/remotelinuxqmltoolingsupport.cpp b/src/plugins/remotelinux/remotelinuxqmltoolingsupport.cpp index 933c91f476..3bd7777a31 100644 --- a/src/plugins/remotelinux/remotelinuxqmltoolingsupport.cpp +++ b/src/plugins/remotelinux/remotelinuxqmltoolingsupport.cpp @@ -25,8 +25,6 @@ #include "remotelinuxqmltoolingsupport.h" -#include <projectexplorer/runnables.h> - #include <ssh/sshconnection.h> #include <utils/qtcprocess.h> #include <utils/url.h> @@ -67,7 +65,7 @@ void RemoteLinuxQmlToolingSupport::start() serverUrl.setPort(qmlPort.number()); m_runworker->recordData("QmlServerUrl", serverUrl); - auto r = runnable().as<StandardRunnable>(); + Runnable r = runnable(); QtcProcess::addArg(&r.commandLineArguments, QmlDebug::qmlDebugTcpArguments(m_services, qmlPort), device()->osType()); diff --git a/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp b/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp index 2f16858b68..acaa5fdf17 100644 --- a/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp +++ b/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp @@ -33,7 +33,6 @@ #include <projectexplorer/kitinformation.h> #include <projectexplorer/project.h> #include <projectexplorer/runconfigurationaspects.h> -#include <projectexplorer/runnables.h> #include <projectexplorer/target.h> #include <qtsupport/qtoutputformatter.h> diff --git a/src/plugins/valgrind/callgrind/callgrindcontroller.cpp b/src/plugins/valgrind/callgrind/callgrindcontroller.cpp index 5bc4b2515d..33b3797e97 100644 --- a/src/plugins/valgrind/callgrind/callgrindcontroller.cpp +++ b/src/plugins/valgrind/callgrind/callgrindcontroller.cpp @@ -126,7 +126,7 @@ void CallgrindController::run(Option option) connect(m_controllerProcess, &ApplicationLauncher::finished, this, &CallgrindController::controllerProcessClosed); - StandardRunnable controller = m_valgrindRunnable; + Runnable controller = m_valgrindRunnable; controller.executable = CALLGRIND_CONTROL_BINARY; controller.runMode = ApplicationLauncher::Gui; controller.commandLineArguments = QString("%1 %2").arg(toOptionString(option)).arg(m_pid); @@ -280,8 +280,7 @@ void CallgrindController::cleanupTempFile() void CallgrindController::setValgrindRunnable(const Runnable &runnable) { - QTC_ASSERT(runnable.is<StandardRunnable>(), return); - m_valgrindRunnable = runnable.as<StandardRunnable>(); + m_valgrindRunnable = runnable; } } // namespace Callgrind diff --git a/src/plugins/valgrind/callgrind/callgrindcontroller.h b/src/plugins/valgrind/callgrind/callgrindcontroller.h index 3f5d321d20..057ec794a8 100644 --- a/src/plugins/valgrind/callgrind/callgrindcontroller.h +++ b/src/plugins/valgrind/callgrind/callgrindcontroller.h @@ -29,7 +29,7 @@ #include <ssh/sftpchannel.h> #include <ssh/sshconnection.h> -#include <projectexplorer/runnables.h> +#include <projectexplorer/runconfiguration.h> #include <QProcess> @@ -83,7 +83,7 @@ private: void controllerProcessClosed(bool success); ProjectExplorer::ApplicationLauncher *m_controllerProcess = nullptr; - ProjectExplorer::StandardRunnable m_valgrindRunnable; + ProjectExplorer::Runnable m_valgrindRunnable; qint64 m_pid = 0; Option m_lastOption = Unknown; diff --git a/src/plugins/valgrind/memchecktool.cpp b/src/plugins/valgrind/memchecktool.cpp index e322b737fc..a55adcf754 100644 --- a/src/plugins/valgrind/memchecktool.cpp +++ b/src/plugins/valgrind/memchecktool.cpp @@ -727,7 +727,7 @@ MemcheckTool::MemcheckTool() void MemcheckTool::heobAction() { #ifdef Q_OS_WIN - StandardRunnable sr; + Runnable sr; Abi abi; bool hasLocalRc = false; Kit *kit = nullptr; @@ -739,13 +739,11 @@ void MemcheckTool::heobAction() abi = ToolChainKitInformation::targetAbi(kit); const Runnable runnable = rc->runnable(); - if (runnable.is<StandardRunnable>()) { - sr = runnable.as<StandardRunnable>(); - const IDevice::ConstPtr device = sr.device; - hasLocalRc = device && device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE; - if (!hasLocalRc) - hasLocalRc = DeviceTypeKitInformation::deviceTypeId(kit) == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE; - } + sr = runnable; + const IDevice::ConstPtr device = sr.device; + hasLocalRc = device && device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE; + if (!hasLocalRc) + hasLocalRc = DeviceTypeKitInformation::deviceTypeId(kit) == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE; } } } diff --git a/src/plugins/valgrind/valgrindengine.cpp b/src/plugins/valgrind/valgrindengine.cpp index 7b6309247f..82ed9cc0f9 100644 --- a/src/plugins/valgrind/valgrindengine.cpp +++ b/src/plugins/valgrind/valgrindengine.cpp @@ -83,8 +83,7 @@ void ValgrindToolRunner::start() m_runner.setValgrindExecutable(m_settings->valgrindExecutable()); m_runner.setValgrindArguments(genericToolArguments() + toolArguments()); m_runner.setDevice(device()); - QTC_ASSERT(runnable().is<StandardRunnable>(), reportFailure()); - m_runner.setDebuggee(runnable().as<StandardRunnable>()); + m_runner.setDebuggee(runnable()); connect(&m_runner, &ValgrindRunner::processOutputReceived, this, &ValgrindToolRunner::receiveProcessOutput); @@ -114,8 +113,7 @@ void ValgrindToolRunner::stop() QString ValgrindToolRunner::executable() const { - QTC_ASSERT(runnable().is<StandardRunnable>(), return QString()); - return runnable().as<StandardRunnable>().executable; + return runnable().executable; } QStringList ValgrindToolRunner::genericToolArguments() const diff --git a/src/plugins/valgrind/valgrindmemcheckparsertest.cpp b/src/plugins/valgrind/valgrindmemcheckparsertest.cpp index 3350895753..3071b0345c 100644 --- a/src/plugins/valgrind/valgrindmemcheckparsertest.cpp +++ b/src/plugins/valgrind/valgrindmemcheckparsertest.cpp @@ -33,7 +33,7 @@ #include <projectexplorer/devicesupport/devicemanager.h> #include <projectexplorer/projectexplorer.h> -#include <projectexplorer/runnables.h> +#include <projectexplorer/runconfiguration.h> #include <QFile> #include <QFileInfo> @@ -477,7 +477,7 @@ void ValgrindMemcheckParserTest::testRealValgrind() QString executable = QProcessEnvironment::systemEnvironment().value("VALGRIND_TEST_BIN", fakeValgrindExecutable()); qDebug() << "running exe:" << executable << " HINT: set VALGRIND_TEST_BIN to change this"; - ProjectExplorer::StandardRunnable debuggee; + ProjectExplorer::Runnable debuggee; debuggee.executable = executable; debuggee.environment = sysEnv; ValgrindRunner runner; @@ -514,7 +514,7 @@ void ValgrindMemcheckParserTest::testValgrindStartError() QFETCH(QString, debuggee); QFETCH(QString, debuggeeArgs); - ProjectExplorer::StandardRunnable debuggeeExecutable; + ProjectExplorer::Runnable debuggeeExecutable; debuggeeExecutable.executable = debuggee; debuggeeExecutable.environment = Utils::Environment::systemEnvironment(); debuggeeExecutable.commandLineArguments = debuggeeArgs; diff --git a/src/plugins/valgrind/valgrindrunner.cpp b/src/plugins/valgrind/valgrindrunner.cpp index 692e02d4be..86f8c8b4e4 100644 --- a/src/plugins/valgrind/valgrindrunner.cpp +++ b/src/plugins/valgrind/valgrindrunner.cpp @@ -57,7 +57,7 @@ public: void findPidOutputReceived(const QString &out); ValgrindRunner *q; - StandardRunnable m_debuggee; + Runnable m_debuggee; ApplicationLauncher m_valgrindProcess; IDevice::ConstPtr m_device; @@ -106,7 +106,7 @@ void ValgrindRunner::Private::run() fullArgs << "--dsymutil=yes"; fullArgs << m_debuggee.executable; - StandardRunnable valgrind; + Runnable valgrind; valgrind.executable = m_valgrindExecutable; valgrind.workingDirectory = m_debuggee.workingDirectory; valgrind.environment = m_debuggee.environment; @@ -154,7 +154,7 @@ void ValgrindRunner::Private::remoteProcessStarted() // plain path to exe, m_valgrindExe contains e.g. env vars etc. pp. const QString proc = m_valgrindExecutable.split(' ').last(); - StandardRunnable findPid; + Runnable findPid; findPid.executable = "/bin/sh"; // sleep required since otherwise we might only match "bash -c..." // and not the actual valgrind run @@ -238,7 +238,7 @@ void ValgrindRunner::setValgrindArguments(const QStringList &toolArguments) d->m_valgrindArguments = toolArguments; } -void ValgrindRunner::setDebuggee(const StandardRunnable &debuggee) +void ValgrindRunner::setDebuggee(const Runnable &debuggee) { d->m_debuggee = debuggee; } diff --git a/src/plugins/valgrind/valgrindrunner.h b/src/plugins/valgrind/valgrindrunner.h index b2dcf754fd..aaad50c008 100644 --- a/src/plugins/valgrind/valgrindrunner.h +++ b/src/plugins/valgrind/valgrindrunner.h @@ -26,7 +26,7 @@ #pragma once -#include <projectexplorer/runnables.h> +#include <projectexplorer/runconfiguration.h> #include <utils/outputformat.h> @@ -46,7 +46,7 @@ public: void setValgrindExecutable(const QString &executable); void setValgrindArguments(const QStringList &toolArguments); - void setDebuggee(const ProjectExplorer::StandardRunnable &debuggee); + void setDebuggee(const ProjectExplorer::Runnable &debuggee); void setProcessChannelMode(QProcess::ProcessChannelMode mode); void setLocalServerAddress(const QHostAddress &localServerAddress); void setDevice(const ProjectExplorer::IDevice::ConstPtr &device); diff --git a/src/plugins/valgrind/valgrindtestrunnertest.cpp b/src/plugins/valgrind/valgrindtestrunnertest.cpp index 02541bcdfb..577638db5c 100644 --- a/src/plugins/valgrind/valgrindtestrunnertest.cpp +++ b/src/plugins/valgrind/valgrindtestrunnertest.cpp @@ -35,7 +35,7 @@ #include <projectexplorer/devicesupport/devicemanager.h> #include <projectexplorer/projectexplorer.h> -#include <projectexplorer/runnables.h> +#include <projectexplorer/runconfiguration.h> #include <utils/algorithm.h> @@ -77,7 +77,7 @@ QString ValgrindTestRunnerTest::runTestBinary(const QString &binary, const QStri const QFileInfo binPathFileInfo(appBinDir, binary); if (!binPathFileInfo.isExecutable()) return QString(); - ProjectExplorer::StandardRunnable debuggee; + ProjectExplorer::Runnable debuggee; const QString &binPath = binPathFileInfo.canonicalFilePath(); debuggee.executable = binPath; debuggee.environment = Utils::Environment::systemEnvironment(); |