aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qtsupport/exampleslistmodel.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2022-08-24 14:56:40 +0200
committerEike Ziller <eike.ziller@qt.io>2022-08-29 13:39:16 +0000
commit904c3688585aea21352ec4a91a7b90f17a4d183b (patch)
tree725d4dc119a8da2b172b75738fdc1cdf1acd86d1 /src/plugins/qtsupport/exampleslistmodel.cpp
parentc0f2fb9981e113835e0bf5ae4bfd62a107f428c4 (diff)
Projects: 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: I2217f13336ec816d28bd447ccd14a405bff2a3a7 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/plugins/qtsupport/exampleslistmodel.cpp')
-rw-r--r--src/plugins/qtsupport/exampleslistmodel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/qtsupport/exampleslistmodel.cpp b/src/plugins/qtsupport/exampleslistmodel.cpp
index 444062268e..a0416e17ce 100644
--- a/src/plugins/qtsupport/exampleslistmodel.cpp
+++ b/src/plugins/qtsupport/exampleslistmodel.cpp
@@ -20,6 +20,7 @@
#include <qtsupport/qtversionmanager.h>
#include <utils/algorithm.h>
+#include <utils/environment.h>
#include <utils/filepath.h>
#include <utils/qtcassert.h>
#include <utils/stringutils.h>
@@ -35,8 +36,7 @@ namespace Internal {
static bool debugExamples()
{
- static bool isDebugging = qEnvironmentVariableIsSet("QTC_DEBUG_EXAMPLESMODEL");
- return isDebugging;
+ return qtcEnvironmentVariableIsSet("QTC_DEBUG_EXAMPLESMODEL");
}
static const char kSelectedExampleSetKey[] = "WelcomePage/SelectedExampleSet";