Utils: Use Utils::CommandLine as input for ProcessArgs::prepareCommand

Change-Id: Ib5878a159bda0e6b6253f1f4e1abc1acb5ecb573
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
hjk
2021-08-02 18:39:02 +02:00
parent 4a42bcd4e8
commit 0567f35e21
3 changed files with 13 additions and 16 deletions

View File

@@ -579,7 +579,6 @@ void QtcProcess::start()
}
Environment env;
const OsType osType = HostOsInfo::hostOs();
if (d->m_haveEnv) {
if (d->m_environment.size() == 0)
qWarning("QtcProcess::start: Empty environment set when running '%s'.",
@@ -595,11 +594,10 @@ void QtcProcess::start()
QString command;
ProcessArgs arguments;
bool success = ProcessArgs::prepareCommand(d->m_commandLine.executable().toString(),
d->m_commandLine.arguments(),
&command, &arguments, osType, &env,
bool success = ProcessArgs::prepareCommand(d->m_commandLine, &command, &arguments, &env,
&d->m_workingDirectory);
if (osType == OsTypeWindows) {
if (d->m_commandLine.executable().osType() == OsTypeWindows) {
QString args;
if (d->m_useCtrlCStub) {
if (d->m_process->lowPriority())