forked from qt-creator/qt-creator
Environment: make usage of Environment.iterators more consistent
Change-Id: I114ddb2238ad19ac0681b8405925f283f2460f21 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -394,7 +394,7 @@ static QStringList splitArgsUnix(const QString &args, bool abortOnMeta,
|
|||||||
if (abortOnMeta)
|
if (abortOnMeta)
|
||||||
goto metaerr; // Assume this is a shell builtin
|
goto metaerr; // Assume this is a shell builtin
|
||||||
} else {
|
} else {
|
||||||
cret += *vit;
|
cret += env->value(vit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!braced)
|
if (!braced)
|
||||||
@@ -444,7 +444,7 @@ static QStringList splitArgsUnix(const QString &args, bool abortOnMeta,
|
|||||||
if (abortOnMeta)
|
if (abortOnMeta)
|
||||||
goto metaerr; // Assume this is a shell builtin
|
goto metaerr; // Assume this is a shell builtin
|
||||||
} else {
|
} else {
|
||||||
val = *vit;
|
val = env->value(vit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int i = 0; i < val.length(); i++) {
|
for (int i = 0; i < val.length(); i++) {
|
||||||
|
@@ -59,7 +59,7 @@ QString QnxDeviceProcess::fullCommandLine(const StandardRunnable &runnable) cons
|
|||||||
|
|
||||||
const Environment env = runnable.environment;
|
const Environment env = runnable.environment;
|
||||||
for (auto it = env.constBegin(); it != env.constEnd(); ++it)
|
for (auto it = env.constBegin(); it != env.constEnd(); ++it)
|
||||||
fullCommandLine += QString::fromLatin1("%1='%2' ").arg(it.key()).arg(it.value());
|
fullCommandLine += QString::fromLatin1("%1='%2' ").arg(env.key(it)).arg(env.value(it));
|
||||||
|
|
||||||
fullCommandLine += QString::fromLatin1("%1 & echo $! > %2").arg(cmd).arg(m_pidFile);
|
fullCommandLine += QString::fromLatin1("%1 & echo $! > %2").arg(cmd).arg(m_pidFile);
|
||||||
|
|
||||||
|
@@ -88,7 +88,7 @@ QString LinuxDeviceProcess::fullCommandLine(const StandardRunnable &runnable) co
|
|||||||
for (auto it = env.constBegin(); it != env.constEnd(); ++it) {
|
for (auto it = env.constBegin(); it != env.constEnd(); ++it) {
|
||||||
if (!envString.isEmpty())
|
if (!envString.isEmpty())
|
||||||
envString += QLatin1Char(' ');
|
envString += QLatin1Char(' ');
|
||||||
envString.append(it.key()).append(QLatin1String("='")).append(it.value())
|
envString.append(env.key(it)).append(QLatin1String("='")).append(env.value(it))
|
||||||
.append(QLatin1Char('\''));
|
.append(QLatin1Char('\''));
|
||||||
}
|
}
|
||||||
fullCommandLine.append("echo $$ && ");
|
fullCommandLine.append("echo $$ && ");
|
||||||
|
Reference in New Issue
Block a user