diff options
| author | Al <26797547+Al12rs@users.noreply.github.com> | 2020-06-08 12:04:54 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-08 12:04:54 -0700 |
| commit | 29893868dc318ba949b0ddc5aa996091dc9ac11b (patch) | |
| tree | 192e67244374b56e169003a71ad0ff9463567ac4 /src/organizercore.cpp | |
| parent | 4e0d47868ab78c58afca0733d3686c7dc3c6a4d9 (diff) | |
| parent | 1aedff5c60cce4b4dda0ca52d0d235361232752f (diff) | |
Merge pull request #1114 from Holt59/iorganizer-findfiles-glob
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..b167b8e3 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 = ToQString(file->getFullPath()); + if (filter(fullPath)) { + result.append(fullPath); } } } |
