QString::locateAwareCompare() is better for human-like sorting

This commit is contained in:
MrMelon 2022-06-07 15:27:57 +01:00
parent 89d4405563
commit 1d9797660b
No known key found for this signature in database
GPG Key ID: B0ADD5395BCDAAB6

View File

@ -60,7 +60,7 @@ void IconList::sortIconList()
{ {
qDebug() << "Sorting icon list..."; qDebug() << "Sorting icon list...";
std::sort(icons.begin(), icons.end(), [](const MMCIcon& a, const MMCIcon& b) { std::sort(icons.begin(), icons.end(), [](const MMCIcon& a, const MMCIcon& b) {
return a.m_key.compare(b.m_key) < 0; return a.m_key.localeAwareCompare(b.m_key) < 0;
}); });
reindex(); reindex();
} }