diff options
| author | Eike Ziller <eike.ziller@qt.io> | 2022-08-24 14:54:30 +0200 |
|---|---|---|
| committer | Eike Ziller <eike.ziller@qt.io> | 2022-08-26 08:03:01 +0000 |
| commit | 025bdfe702c4c4b8dd0022367139210663b9057c (patch) | |
| tree | 20e66c25326ed365678dc726de9ea9c1c7313e05 /src/plugins/git/gitclient.cpp | |
| parent | d45418446767577793392be5b62b592b09f07595 (diff) | |
| download | qt-creator-025bdfe702c4c4b8dd0022367139210663b9057c.tar.gz | |
VCS: 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: I364e5b663353f37121279a58f4a9fd514cddbbf0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/git/gitclient.cpp')
| -rw-r--r-- | src/plugins/git/gitclient.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index a14577c366..275400149b 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -2244,11 +2244,10 @@ Environment GitClient::processEnvironment() const environment.prependOrSetPath(FilePath::fromUserInput(gitPath)); if (HostOsInfo::isWindowsHost() && settings().winSetHomeEnvironment.value()) { QString homePath; - if (qEnvironmentVariableIsEmpty("HOMESHARE")) { + if (qtcEnvironmentVariableIsEmpty("HOMESHARE")) { homePath = QDir::toNativeSeparators(QDir::homePath()); } else { - homePath = QString::fromLocal8Bit(qgetenv("HOMEDRIVE")) - + QString::fromLocal8Bit(qgetenv("HOMEPATH")); + homePath = qtcEnvironmentVariable("HOMEDRIVE") + qtcEnvironmentVariable("HOMEPATH"); } environment.set("HOME", homePath); } |
