QString::locateAwareCompare() is better for human-like sorting
This commit is contained in:
parent
89d4405563
commit
1d9797660b
@ -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();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user