forked from qt-creator/qt-creator
ApplicationLauncher: Treat DesktopDevice as local
Treat DesktopDevice and all derived devices as local in application launcher. Change-Id: Ie1a025c03f1c96158c67e0c900f89e33ec7c4663 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
|
||||
#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<const DesktopDevice>();
|
||||
|
||||
m_exitCode = 0;
|
||||
m_exitStatus = QProcess::NormalExit;
|
||||
|
@@ -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()
|
||||
|
@@ -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();
|
||||
}
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user