diff --git a/src/plugins/projectexplorer/applicationlauncher.cpp b/src/plugins/projectexplorer/applicationlauncher.cpp index 282f61a642f..6159a2a5599 100644 --- a/src/plugins/projectexplorer/applicationlauncher.cpp +++ b/src/plugins/projectexplorer/applicationlauncher.cpp @@ -35,6 +35,7 @@ #include #include +#include "devicesupport/desktopdevice.h" #include "devicesupport/deviceprocess.h" #include "projectexplorer.h" #include "projectexplorersettings.h" @@ -329,7 +330,7 @@ void ApplicationLauncher::start() void ApplicationLauncherPrivate::start() { - m_isLocal = m_runnable.device.isNull(); + m_isLocal = m_runnable.device.isNull() || m_runnable.device.dynamicCast(); m_exitCode = 0; m_exitStatus = QProcess::NormalExit; diff --git a/src/plugins/projectexplorer/runcontrol.cpp b/src/plugins/projectexplorer/runcontrol.cpp index 8be14b73d52..7531269a945 100644 --- a/src/plugins/projectexplorer/runcontrol.cpp +++ b/src/plugins/projectexplorer/runcontrol.cpp @@ -1243,20 +1243,15 @@ void SimpleTargetRunner::doStart(const Runnable &runnable, const IDevice::ConstP if (runnable.command.isEmpty()) { reportFailure(RunControl::tr("No executable specified.")); - } else { - Runnable runnableWithoutDevice = runnable; - runnableWithoutDevice.device.reset(); - m_launcher.setRunnable(runnableWithoutDevice); - m_launcher.start(); + return; } - } else { connect(&m_launcher, &ApplicationLauncher::processStarted, this, &RunWorker::reportStarted); - Runnable runnableWithDevice = runnable; - runnableWithDevice.device = device; - m_launcher.setRunnable(runnable); - m_launcher.start(); } + Runnable runnableWithDevice = runnable; + runnableWithDevice.device = device; + m_launcher.setRunnable(runnableWithDevice); + m_launcher.start(); } void SimpleTargetRunner::stop() diff --git a/src/plugins/valgrind/callgrind/callgrindcontroller.cpp b/src/plugins/valgrind/callgrind/callgrindcontroller.cpp index e021f109977..d89d9e0e62c 100644 --- a/src/plugins/valgrind/callgrind/callgrindcontroller.cpp +++ b/src/plugins/valgrind/callgrind/callgrindcontroller.cpp @@ -125,10 +125,7 @@ void CallgrindController::run(Option option) Runnable controller = m_valgrindRunnable; controller.command.setExecutable(FilePath::fromString(CALLGRIND_CONTROL_BINARY)); controller.command.setArguments(QString("%1 %2").arg(toOptionString(option)).arg(m_pid)); - if (m_valgrindRunnable.device - && m_valgrindRunnable.device->type() != ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) { - controller.device = m_valgrindRunnable.device; - } + controller.device = m_valgrindRunnable.device; m_controllerProcess->setRunnable(controller); m_controllerProcess->start(); } diff --git a/src/plugins/valgrind/valgrindrunner.cpp b/src/plugins/valgrind/valgrindrunner.cpp index a2d46ad43ea..d29ac3fa7fb 100644 --- a/src/plugins/valgrind/valgrindrunner.cpp +++ b/src/plugins/valgrind/valgrindrunner.cpp @@ -135,10 +135,9 @@ bool ValgrindRunner::Private::run() valgrind.command = cmd; valgrind.workingDirectory = m_debuggee.workingDirectory; valgrind.environment = m_debuggee.environment; - if (m_device->type() != ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE - && m_device->type() != "DockerDeviceType") { + if (m_device->type() != "DockerDeviceType") valgrind.device = m_device; - } + m_valgrindProcess.setRunnable(valgrind); m_valgrindProcess.start(); return true;