Utils: Introduce a FilePath::searchInPath() convenience function

Diverts to searchInDirectory(). Use it in some places.

Change-Id: I9e5642f0ae0ed4dd9fb9f34bcaa11a25bd26c690
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2021-08-17 14:49:19 +02:00
parent 59c0e5480a
commit 57a90b019f
6 changed files with 11 additions and 8 deletions

View File

@@ -223,9 +223,7 @@ FilePath PathChooserPrivate::expandedPath(const QString &input) const
switch (m_acceptingKind) {
case PathChooser::Command:
case PathChooser::ExistingCommand: {
FilePaths searchPaths = env.path();
searchPaths.append(m_baseDirectory);
const FilePath expanded = path.searchInDirectories(searchPaths);
const FilePath expanded = path.searchInPath({m_baseDirectory});
return expanded.isEmpty() ? path : expanded;
}
case PathChooser::Any: