forked from qt-creator/qt-creator
Utils: Drop unneeded env parameter in searchInDirectoryHelper
Change-Id: I8134fe3f9306d8826b409771f60db36851613954 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -136,8 +136,7 @@ void Environment::setupEnglishOutput()
|
|||||||
set("LANGUAGE", "en_US:en");
|
set("LANGUAGE", "en_US:en");
|
||||||
}
|
}
|
||||||
|
|
||||||
static FilePath searchInDirectory(const Environment &env,
|
static FilePath searchInDirectory(const QStringList &execs,
|
||||||
const QStringList &execs,
|
|
||||||
const FilePath &directory,
|
const FilePath &directory,
|
||||||
QSet<FilePath> &alreadyChecked)
|
QSet<FilePath> &alreadyChecked)
|
||||||
{
|
{
|
||||||
@@ -226,7 +225,7 @@ static FilePath searchInDirectoriesHelper(const Environment &env,
|
|||||||
|
|
||||||
QSet<FilePath> alreadyChecked;
|
QSet<FilePath> alreadyChecked;
|
||||||
for (const FilePath &dir : dirs) {
|
for (const FilePath &dir : dirs) {
|
||||||
FilePath tmp = searchInDirectory(env, execs, dir, alreadyChecked);
|
FilePath tmp = searchInDirectory(execs, dir, alreadyChecked);
|
||||||
if (!tmp.isEmpty() && (!func || func(tmp)))
|
if (!tmp.isEmpty() && (!func || func(tmp)))
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
@@ -236,7 +235,7 @@ static FilePath searchInDirectoriesHelper(const Environment &env,
|
|||||||
return FilePath();
|
return FilePath();
|
||||||
|
|
||||||
for (const FilePath &p : env.path()) {
|
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)))
|
if (!tmp.isEmpty() && (!func || func(tmp)))
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
@@ -281,14 +280,14 @@ FilePaths Environment::findAllInPath(const QString &executable,
|
|||||||
QSet<FilePath> result;
|
QSet<FilePath> result;
|
||||||
QSet<FilePath> alreadyChecked;
|
QSet<FilePath> alreadyChecked;
|
||||||
for (const FilePath &dir : additionalDirs) {
|
for (const FilePath &dir : additionalDirs) {
|
||||||
FilePath tmp = searchInDirectory(*this, execs, dir, alreadyChecked);
|
FilePath tmp = searchInDirectory(execs, dir, alreadyChecked);
|
||||||
if (!tmp.isEmpty() && (!func || func(tmp)))
|
if (!tmp.isEmpty() && (!func || func(tmp)))
|
||||||
result << tmp;
|
result << tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!executable.contains('/')) {
|
if (!executable.contains('/')) {
|
||||||
for (const FilePath &p : path()) {
|
for (const FilePath &p : path()) {
|
||||||
FilePath tmp = searchInDirectory(*this, execs, p, alreadyChecked);
|
FilePath tmp = searchInDirectory(execs, p, alreadyChecked);
|
||||||
if (!tmp.isEmpty() && (!func || func(tmp)))
|
if (!tmp.isEmpty() && (!func || func(tmp)))
|
||||||
result << tmp;
|
result << tmp;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user