In TreeItem, there has two compare function itemNameLessThan and itemDescriptionLessThan.
Those two functions were use < operator to compare string. But it doesn't consider about locale.
So change compare function to QString::localeAwareCompare
BUG: 404393
Details
Details
- Reviewers
cfeck pino mlaurent - Group Reviewers
Plasma - Commits
- R103:fb171dff39c7: Fix sorting to use locale-aware comparisons
Based on bug attachment, I add the Á and A to test it.
Diff Detail
Diff Detail
- Repository
- R103 KMenu Editor
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
Are the toLower() calls really needed? I would have expected that localeAwareCompare() is case insensitive by default.
Also, please use return x instead of return (x).
Comment Actions
remove toUpper when string comparing
QString::localeAwareCompare is insensitive by default. So toUpper is not needed.
and return without ();