aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2022-08-24 14:53:40 +0200
committerEike Ziller <eike.ziller@qt.io>2022-08-29 09:12:20 +0000
commit57745407defd03d78dd155224423940f05ee0407 (patch)
tree866168d2349c4caaebf49cc77c85fd67391e5749 /src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp
parentfe4e74af7580d59f11c1936d31eecf63e0b68c3f (diff)
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>
Diffstat (limited to 'src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp')
-rw-r--r--src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp
index 214648ada7..b2715df843 100644
--- a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp
+++ b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp
@@ -25,6 +25,7 @@
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/idocument.h>
+#include <utils/environment.h>
#include <utils/fileutils.h>
#include <QDebug>
@@ -483,7 +484,7 @@ namespace CppEditor::Internal::Tests {
void FollowSymbolTest::initTestCase()
{
- const QString clangdFromEnv = qEnvironmentVariable("QTC_CLANGD");
+ const QString clangdFromEnv = Utils::qtcEnvironmentVariable("QTC_CLANGD");
if (clangdFromEnv.isEmpty())
return;
ClangdSettings::setClangdFilePath(Utils::FilePath::fromString(clangdFromEnv));