Priority: P3: Somewhat important
Affects Version/s: 5.15.5, 6.1.2
Component/s: Core: QString and Unicode
Commits:94de5f9b25e1816039885c765e2a5b312f7daa7e (qt/qtbase/dev) a1e694b641aeeb8731f50f22e9223ea57c827c7a (qt/qtbase/6.2)
Due to this change, it is no longer possible to change collation locale used by QString::localeAwareCompare():
Before it was possible to use QLocale::setDefault(..) to do so. Unfortunately in addition to that,
QTBUG-36149 made QString cache the used QCollator, which means it is no longer possible to dynamically change it after the first use and also that introduced a bug where different threads could have different behaviors if it was changed at runtime, but that is now masked off by this more recent change.
I am guessing the right way would probably be to use QCollator directly instead of localeAwareCompare() when a specific collation is required, but it would be great if it was possible to change it.
localeAwareCompare() is also used by QSortFilterProxyModel which would really be nice if it the change was possible without having to subclass it. Also item view widgets use localeAwareCompare by default and there is no way for user to change that.
|For Gerrit Dashboard: QTBUG-95050|
|362727,6||QCollator: add public, static functions to do comparisons||dev||qt/qtbase||Status: NEW||-1||0|
|359268,3||Change QCollator's default locale to QLocale().collation()||dev||qt/qtbase||Status: MERGED||+2||0|
|360160,2||Change QCollator's default locale to QLocale().collation()||6.2||qt/qtbase||Status: MERGED||+2||0|
|360161,2||Change QCollator's default locale to QLocale().collation()||6.1||qt/qtbase||Status: MERGED||+2||0|
|360193,2||Change QCollator's default locale to QLocale().collation()||tqtc/lts-5.15||qt/tqtc-qtbase||Status: MERGED||+2||0|
|362725,3||QString::localeAwareCompare: adapt to QLocale::setDefault() being called||dev||qt/qtbase||Status: MERGED||+2||0|
|362925,2||QString::localeAwareCompare: adapt to QLocale::setDefault() being called||6.2||qt/qtbase||Status: MERGED||+2||0|