Utils: Combine some of the iterateWithFind overloads

Change-Id: I668447d0049f2e35cd0c76d2c5708779196167ec
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
hjk
2022-10-11 13:58:26 +02:00
parent 48755cf7fd
commit b1471fe61f
14 changed files with 83 additions and 169 deletions

View File

@@ -948,17 +948,8 @@ bool DockerDevice::ensureReachable(const FilePath &other) const
}
void DockerDevice::iterateDirectory(const FilePath &filePath,
const FilePath::IterateDirCallback &callBack,
const FileFilter &filter) const
{
QTC_ASSERT(handlesFile(filePath), return);
auto runInShell = [this](const CommandLine &cmd) { return d->runInShell(cmd); };
FileUtils::iterateUnixDirectory(filePath, filter, &d->m_useFind, runInShell, callBack);
}
void DockerDevice::iterateDirectory(const FilePath &filePath,
const FilePath::IterateDirWithInfoCallback &callBack,
const FileFilter &filter) const
const FilePath::IterateDirCallback &callBack,
const FileFilter &filter) const
{
QTC_ASSERT(handlesFile(filePath), return);
auto runInShell = [this](const CommandLine &cmd) { return d->runInShell(cmd); };