From 13d79f3cbe35e233e575d236b8678db8c5e2d62b Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Mon, 8 Jun 2020 18:37:05 +0200 Subject: Add findFiles overload with glob patterns. --- src/organizercore.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/organizercore.cpp') diff --git a/src/organizercore.cpp b/src/organizercore.cpp index efb98cca..27f54d4b 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -862,9 +862,10 @@ QStringList OrganizerCore::findFiles( dir = dir->findSubDirectoryRecursive(ToWString(path)); if (dir != nullptr) { std::vector files = dir->getFiles(); - foreach (FileEntryPtr file, files) { - if (filter(ToQString(file->getFullPath()))) { - result.append(ToQString(file->getFullPath())); + for (FileEntryPtr &file: files) { + QString fullPath = QString::fromStdWString(file->getFullPath()); + if (filter(fullPath)) { + result.append(fullPath); } } } -- cgit v1.3.1