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 <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Jarek Kobus
2022-02-21 13:49:08 +01:00
parent aba39aee5f
commit 778ed83149

View File

@@ -337,9 +337,8 @@ void ApplicationLauncherPrivate::start()
m_resultData = {};
if (m_isLocal) {
m_process.reset(new QtcProcess(this));
if (m_isLocal) {
// 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);