forked from qt-creator/qt-creator
Various: 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: I724eecc040e33e249a88243f27e8a9e72e54f24b Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
#include <projectexplorer/toolchain.h>
|
||||
|
||||
#include <utils/environment.h>
|
||||
|
||||
#include <QFileInfo>
|
||||
#include <QProcess>
|
||||
#include <QSignalSpy>
|
||||
@@ -60,7 +62,7 @@ void AutoTestUnitTests::initTestCase()
|
||||
|
||||
m_tmpDir = new CppEditor::Tests::TemporaryCopiedDir(":/unit_test");
|
||||
|
||||
if (!qEnvironmentVariableIsEmpty("BOOST_INCLUDE_DIR")) {
|
||||
if (!qtcEnvironmentVariableIsEmpty("BOOST_INCLUDE_DIR")) {
|
||||
m_checkBoost = true;
|
||||
} else {
|
||||
if (Utils::HostOsInfo::isLinuxHost()
|
||||
@@ -178,7 +180,7 @@ void AutoTestUnitTests::testCodeParserSwitchStartup_data()
|
||||
|
||||
void AutoTestUnitTests::testCodeParserGTest()
|
||||
{
|
||||
if (qEnvironmentVariableIsEmpty("GOOGLETEST_DIR"))
|
||||
if (qtcEnvironmentVariableIsEmpty("GOOGLETEST_DIR"))
|
||||
QSKIP("This test needs googletest - set GOOGLETEST_DIR (point to googletest repository)");
|
||||
|
||||
QFETCH(QString, projectFilePath);
|
||||
|
||||
Reference in New Issue
Block a user