diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-06-08 18:37:05 +0200 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-06-08 18:37:05 +0200 |
| commit | 13d79f3cbe35e233e575d236b8678db8c5e2d62b (patch) | |
| tree | 297e1241cff50eef41dd627888fef9b359174087 /src/organizercore.cpp | |
| parent | 4e0d47868ab78c58afca0733d3686c7dc3c6a4d9 (diff) | |
Add findFiles overload with glob patterns.
Diffstat (limited to 'src/organizercore.cpp')
| -rw-r--r-- | src/organizercore.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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<FileEntryPtr> 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); } } } |
