Sort languages combobox by language code

* Avoid creating redundant file lists
* Sort languages combobox by language code

PR #20365.
This commit is contained in:
Chocobo1
2024-02-05 13:44:18 +08:00
committed by GitHub
parent 88a4990435
commit f87ea1b5d3
10 changed files with 41 additions and 49 deletions

View File

@@ -443,10 +443,10 @@ void TorrentFilesWatcher::Worker::processFolder(const Path &path, const Path &wa
if (options.recursive)
{
QDirIterator dirIter {path.data(), (QDir::Dirs | QDir::NoDot | QDir::NoDotDot)};
while (dirIter.hasNext())
QDirIterator iter {path.data(), (QDir::Dirs | QDir::NoDotAndDotDot)};
while (iter.hasNext())
{
const Path folderPath {dirIter.next()};
const Path folderPath {iter.next()};
// Skip processing of subdirectory that is explicitly set as watched folder
if (!m_watchedFolders.contains(folderPath))
processFolder(folderPath, watchedFolderPath, options);