diff --git a/apps/opencs/view/doc/filedialog.cpp b/apps/opencs/view/doc/filedialog.cpp index 373e63bef6..455fda20c2 100644 --- a/apps/opencs/view/doc/filedialog.cpp +++ b/apps/opencs/view/doc/filedialog.cpp @@ -36,9 +36,9 @@ CSVDoc::FileDialog::~FileDialog() = default; void CSVDoc::FileDialog::addFiles(const std::vector& dataDirs) { - for (auto iter = dataDirs.rbegin(); iter != dataDirs.rend(); ++iter) + for (const auto& dir : dataDirs) { - QString path = Files::pathToQString(*iter); + QString path = Files::pathToQString(dir); mSelector->addFiles(path); } mSelector->sortFiles();