Clang/C++: Use qtcEnvironmentVariable* instead of qEnvironmentVariable*

And instead of qgetenv.
Takes Qt Creator's setting at "Environment > System > Environment" into
account, which makes it easier on some platforms to set them (e.g.
macOS), can be configured differently in different settings paths, and
potentially can be changed at runtime (depending on usage).

Change-Id: I7678b8e429b5eff79f87eb637f6f2131be43d904
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Eike Ziller
2022-08-24 14:53:40 +02:00
parent fe4e74af75
commit 57745407de
15 changed files with 41 additions and 30 deletions

View File

@@ -22,6 +22,7 @@
#include <qtsupport/qtkitinformation.h>
#include <utils/environment.h>
#include <utils/executeondestruction.h>
#include <utils/fileutils.h>
@@ -166,7 +167,7 @@ void ClangToolsUnitTests::addTestRow(const QByteArray &relativeFilePath,
int ClangToolsUnitTests::getTimeout()
{
const int t = qEnvironmentVariableIntValue("QTC_CLANGTOOLS_TEST_TIMEOUT");
const int t = qtcEnvironmentVariableIntValue("QTC_CLANGTOOLS_TEST_TIMEOUT");
return t > 0 ? t : 480000;
}