ClangCodeModel: Fix performance regression of code completion

Broke when converting the code to QtcProcess.

Amends 8724a4efbb

Fixes: QTCREATORBUG-26829
Change-Id: I14b4bd9ddc035c1c837231cb6436d9e8e203d5cd
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Eike Ziller
2022-01-06 10:58:24 +01:00
parent 1df8dd3c93
commit bcee5c5dc4

View File

@@ -173,15 +173,15 @@ Environment ProcessCreator::processEnvironment() const
if (temporaryDirectory().isValid()) { if (temporaryDirectory().isValid()) {
const QString temporaryDirectoryPath = temporaryDirectory().path(); const QString temporaryDirectoryPath = temporaryDirectory().path();
processEnvironment.appendOrSet("TMPDIR", temporaryDirectoryPath); processEnvironment.set("TMPDIR", temporaryDirectoryPath);
processEnvironment.appendOrSet("TMP", temporaryDirectoryPath); processEnvironment.set("TMP", temporaryDirectoryPath);
processEnvironment.appendOrSet("TEMP", temporaryDirectoryPath); processEnvironment.set("TEMP", temporaryDirectoryPath);
} }
const Environment &env = m_environment; const Environment &env = m_environment;
for (auto it = env.constBegin(); it != env.constEnd(); ++it) { for (auto it = env.constBegin(); it != env.constEnd(); ++it) {
if (env.isEnabled(it)) if (env.isEnabled(it))
processEnvironment.appendOrSet(env.key(it), env.expandedValueForKey(env.key(it))); processEnvironment.set(env.key(it), env.expandedValueForKey(env.key(it)));
} }
return processEnvironment; return processEnvironment;