forked from qt-creator/qt-creator
Utils: Wrap various file system iteration flags and filters
... into a single class. This makes passing them around as a whole easier, and opens a path to have "generic" filters in form of a lambda or such. Change-Id: Ibf644b2fedcf0f1a35258030710afff8f5873f88 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -58,7 +58,7 @@ FilePath findFallbackDefinitionsLocation()
|
||||
FilePath("/opt") / kateSyntaxPath
|
||||
};
|
||||
for (const FilePath &path : paths) {
|
||||
if (path.exists() && !path.dirEntries({"*.xml"}).isEmpty())
|
||||
if (path.exists() && !path.dirEntries({{"*.xml"}}).isEmpty())
|
||||
return path;
|
||||
}
|
||||
}
|
||||
@@ -76,7 +76,7 @@ FilePath findFallbackDefinitionsLocation()
|
||||
const FilePath dir = FilePath::fromString(output);
|
||||
for (auto &kateSyntaxPath : kateSyntaxPaths) {
|
||||
const FilePath path = dir / kateSyntaxPath;
|
||||
if (path.exists() && !path.dirEntries({"*.xml"}).isEmpty())
|
||||
if (path.exists() && !path.dirEntries({{"*.xml"}}).isEmpty())
|
||||
return path;
|
||||
}
|
||||
}
|
||||
@@ -84,7 +84,7 @@ FilePath findFallbackDefinitionsLocation()
|
||||
}
|
||||
|
||||
const FilePath dir = Core::ICore::resourcePath("generic-highlighter");
|
||||
if (dir.exists() && !dir.dirEntries({"*.xml"}).isEmpty())
|
||||
if (dir.exists() && !dir.dirEntries({{"*.xml"}}).isEmpty())
|
||||
return dir;
|
||||
|
||||
return {};
|
||||
|
||||
Reference in New Issue
Block a user