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

@@ -151,11 +151,11 @@ qint64 Utils::Fs::computePathSize(const Path &path)
// Compute folder size based on its content
qint64 size = 0;
QDirIterator iter {path.data(), QDir::Files | QDir::Hidden | QDir::NoSymLinks, QDirIterator::Subdirectories};
QDirIterator iter {path.data(), (QDir::Files | QDir::Hidden | QDir::NoSymLinks), QDirIterator::Subdirectories};
while (iter.hasNext())
{
iter.next();
size += iter.fileInfo().size();
const QFileInfo fileInfo = iter.nextFileInfo();
size += fileInfo.size();
}
return size;
}