aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2021-09-29 14:31:31 +0200
committerhjk <hjk@qt.io>2021-09-29 19:01:03 +0000
commit67c0104b8e56a3d3089a309e1e09c6380639249b (patch)
tree1730e59a743f5138517cb046ee5122aa4d6c8024
parentfaba85a2c331b0af984050c79655a7d7236d439f (diff)
Git: Take Prepend to PATH into account again, take #2v5.0.2
Amends b5a4d38022, which uses FilePath::searchInPath which does not exist in 5.0. Task-number: QTCREATORBUG-26329 Change-Id: I94ac35cc95a47e4f82c6205ad24d8bdc69ddf1af Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
-rw-r--r--src/plugins/git/gitsettings.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/git/gitsettings.cpp b/src/plugins/git/gitsettings.cpp
index bf431abe57..00270a1d42 100644
--- a/src/plugins/git/gitsettings.cpp
+++ b/src/plugins/git/gitsettings.cpp
@@ -142,10 +142,10 @@ FilePath GitSettings::gitExecutable(bool *ok, QString *errorMessage) const
FilePath binPath = binaryPath.filePath();
if (!binPath.isAbsolutePath()) {
- FilePaths searchPath = binPath.deviceEnvironment().path();
+ Environment env = Environment::systemEnvironment();
if (!path.filePath().isEmpty())
- searchPath.prepend(path.filePath());
- binPath = binPath.searchInPath(searchPath);
+ env.prependOrSetPath(path.filePath().toString());
+ binPath = env.searchInPath(binPath.toString());
}
if (binPath.isEmpty()) {
if (ok)