From 778ed83149c2f36df0af62ab7ce2cd677df27116 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Mon, 21 Feb 2022 13:49:08 +0100 Subject: [PATCH] ApplicationLauncher: Use QtcProcess instead of IDevice::createProcess() And pass a device path to command instead. The QtcProcess should automatically select the device's process implementation when the process is running. Change-Id: I9f6896260a3f5627975331caa31382f4dc6ff7b0 Reviewed-by: hjk Reviewed-by: --- src/plugins/projectexplorer/applicationlauncher.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/projectexplorer/applicationlauncher.cpp b/src/plugins/projectexplorer/applicationlauncher.cpp index 518d6599267..a0cb9c3f71b 100644 --- a/src/plugins/projectexplorer/applicationlauncher.cpp +++ b/src/plugins/projectexplorer/applicationlauncher.cpp @@ -337,9 +337,8 @@ void ApplicationLauncherPrivate::start() m_resultData = {}; + m_process.reset(new QtcProcess(this)); if (m_isLocal) { - m_process.reset(new QtcProcess(this)); - // Work around QTBUG-17529 (QtDeclarative fails with 'File name case mismatch' ...) const FilePath fixedPath = m_runnable.workingDirectory.normalizedPathName(); m_process->setWorkingDirectory(fixedPath); @@ -399,8 +398,9 @@ void ApplicationLauncherPrivate::start() m_state = Run; m_stopRequested = false; - m_process.reset(m_runnable.device->createProcess(this)); - m_process->setCommand(m_runnable.command); + CommandLine cmd = m_runnable.command; + cmd.setExecutable(m_runnable.device->mapToGlobalPath(cmd.executable())); + m_process->setCommand(cmd); m_process->setWorkingDirectory(m_runnable.workingDirectory); m_process->setRemoteEnvironment(m_runnable.environment); m_process->setExtraData(m_runnable.extraData);