Avoid a few double lookups when expanding environment values

Change-Id: Ie84caee89a48d8006e6324c5a82901d01a5fac6c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
hjk
2023-03-02 14:19:42 +01:00
parent 47d375bbb4
commit 08bacd3f19
5 changed files with 10 additions and 10 deletions

View File

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