forked from qt-creator/qt-creator
RemoteLinux: Avoid some explicit uses of environment iterators
Task-number: QTCREATORBUG-28357 Change-Id: Ic8eb7592853749a7d511acc9a528059765c4ed75 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -613,8 +613,9 @@ QString LinuxProcessInterface::fullCommandLine(const CommandLine &commandLine) c
|
|||||||
cmd.addArgs(QString("echo ") + s_pidMarker + "$$" + s_pidMarker + " && ", CommandLine::Raw);
|
cmd.addArgs(QString("echo ") + s_pidMarker + "$$" + s_pidMarker + " && ", CommandLine::Raw);
|
||||||
|
|
||||||
const Environment &env = m_setup.m_environment;
|
const Environment &env = m_setup.m_environment;
|
||||||
for (auto it = env.constBegin(); it != env.constEnd(); ++it)
|
env.forEachEntry([&](const QString &key, const QString &, bool) {
|
||||||
cmd.addArgs(env.key(it) + "='" + env.expandedValueForKey(env.key(it)) + '\'', CommandLine::Raw);
|
cmd.addArgs(key + "='" + env.expandedValueForKey(key) + '\'', CommandLine::Raw);
|
||||||
|
});
|
||||||
|
|
||||||
if (m_setup.m_terminalMode == TerminalMode::Off)
|
if (m_setup.m_terminalMode == TerminalMode::Off)
|
||||||
cmd.addArg("exec");
|
cmd.addArg("exec");
|
||||||
|
@@ -172,12 +172,10 @@ bool MakeInstallStep::init()
|
|||||||
const MakeInstallCommand cmd = buildSystem()->makeInstallCommand(rootDir);
|
const MakeInstallCommand cmd = buildSystem()->makeInstallCommand(rootDir);
|
||||||
if (cmd.environment.hasChanges()) {
|
if (cmd.environment.hasChanges()) {
|
||||||
Environment env = processParameters()->environment();
|
Environment env = processParameters()->environment();
|
||||||
for (auto it = cmd.environment.constBegin(); it != cmd.environment.constEnd(); ++it) {
|
cmd.environment.forEachEntry([&](const QString &key, const QString &, bool enabled) {
|
||||||
if (cmd.environment.isEnabled(it)) {
|
if (enabled)
|
||||||
const QString key = cmd.environment.key(it);
|
|
||||||
env.set(key, cmd.environment.expandedValueForKey(key));
|
env.set(key, cmd.environment.expandedValueForKey(key));
|
||||||
}
|
});
|
||||||
}
|
|
||||||
processParameters()->setEnvironment(env);
|
processParameters()->setEnvironment(env);
|
||||||
}
|
}
|
||||||
m_noInstallTarget = false;
|
m_noInstallTarget = false;
|
||||||
|
Reference in New Issue
Block a user