diff options
author | hjk <hjk@qt.io> | 2021-10-06 16:47:48 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2021-10-06 15:02:44 +0000 |
commit | 2a0d09bdacedda89073b225abc6a3bbf3c26a007 (patch) | |
tree | 6f9281d4e0128bb9fadd1e1a1fe9df91fbb6e49e | |
parent | ee6f3a8cc8eb59a09cec93a75a3013d731cb67d6 (diff) |
Utils: Drop unneeded env parameter in searchInDirectoryHelper
Change-Id: I8134fe3f9306d8826b409771f60db36851613954
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r-- | src/libs/utils/environment.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/libs/utils/environment.cpp b/src/libs/utils/environment.cpp index 2d3d6edf3b..76f32ccb98 100644 --- a/src/libs/utils/environment.cpp +++ b/src/libs/utils/environment.cpp @@ -136,8 +136,7 @@ void Environment::setupEnglishOutput() set("LANGUAGE", "en_US:en"); } -static FilePath searchInDirectory(const Environment &env, - const QStringList &execs, +static FilePath searchInDirectory(const QStringList &execs, const FilePath &directory, QSet<FilePath> &alreadyChecked) { @@ -226,7 +225,7 @@ static FilePath searchInDirectoriesHelper(const Environment &env, QSet<FilePath> alreadyChecked; for (const FilePath &dir : dirs) { - FilePath tmp = searchInDirectory(env, execs, dir, alreadyChecked); + FilePath tmp = searchInDirectory(execs, dir, alreadyChecked); if (!tmp.isEmpty() && (!func || func(tmp))) return tmp; } @@ -236,7 +235,7 @@ static FilePath searchInDirectoriesHelper(const Environment &env, return FilePath(); for (const FilePath &p : env.path()) { - FilePath tmp = searchInDirectory(env, execs, p, alreadyChecked); + FilePath tmp = searchInDirectory(execs, p, alreadyChecked); if (!tmp.isEmpty() && (!func || func(tmp))) return tmp; } @@ -281,14 +280,14 @@ FilePaths Environment::findAllInPath(const QString &executable, QSet<FilePath> result; QSet<FilePath> alreadyChecked; for (const FilePath &dir : additionalDirs) { - FilePath tmp = searchInDirectory(*this, execs, dir, alreadyChecked); + FilePath tmp = searchInDirectory(execs, dir, alreadyChecked); if (!tmp.isEmpty() && (!func || func(tmp))) result << tmp; } if (!executable.contains('/')) { for (const FilePath &p : path()) { - FilePath tmp = searchInDirectory(*this, execs, p, alreadyChecked); + FilePath tmp = searchInDirectory(execs, p, alreadyChecked); if (!tmp.isEmpty() && (!func || func(tmp))) result << tmp; } |