From 67c0104b8e56a3d3089a309e1e09c6380639249b Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 29 Sep 2021 14:31:31 +0200 Subject: Git: Take Prepend to PATH into account again, take #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 Reviewed-by: Qt CI Bot --- src/plugins/git/gitsettings.cpp | 6 +++--- 1 file 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) -- cgit v1.2.3