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:
hjk
2022-01-21 12:22:54 +01:00
parent c6fdb66b2b
commit 1fc83d2a56
35 changed files with 121 additions and 143 deletions

View File

@@ -948,10 +948,7 @@ FilePath FileApiParser::scanForCMakeReplyFile(const FilePath &buildDirectory)
if (!replyDir.exists())
return {};
const FilePaths entries = replyDir.dirEntries({"index-*.json"},
QDir::Files,
QDirIterator::NoIteratorFlags,
QDir::Name);
const FilePaths entries = replyDir.dirEntries({{"index-*.json"}, QDir::Files}, QDir::Name);
return entries.isEmpty() ? FilePath() : entries.first();
}