Qnx: Avoid use of Environment iterators

Change-Id: I2a1be67c1d21a731de1ada3d58099896fb676ffa
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2023-03-02 14:03:41 +01:00
parent 3e5d14b020
commit 5e3af5b0f5

View File

@@ -61,10 +61,9 @@ QString QnxProcessImpl::fullCommandLine(const CommandLine &commandLine) const
ProcessArgs::quoteArg(m_setup.m_workingDirectory.toString()));
const Environment env = m_setup.m_environment;
for (auto it = env.constBegin(); it != env.constEnd(); ++it) {
fullCommandLine += QString::fromLatin1("%1='%2' ")
.arg(env.key(it)).arg(env.expandedValueForKey(env.key(it)));
}
env.forEachEntry([&](const QString &key, const QString &, bool) {
fullCommandLine += QString("%1='%2' ").arg(key).arg(env.expandedValueForKey(key));
});
fullCommandLine += QString::fromLatin1("%1 & echo $! > %2").arg(cmd).arg(m_pidFile);