Use consistent collation testability criteria in corelib/text
tst_qstringapisymmetry needs to use the same collation testability criteria as tst_qcollator, that is, the locales that may be tested without ICU and not on Mac nor Windows are only the system locale and C locale. Task-number: QTBUG-109954 Change-Id: I69f19ae28b3a16b3827c1eee62ae59fcfdf45209 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
4411406d97
commit
22e96ca50d
@ -1482,8 +1482,9 @@ void tst_QStringApiSymmetry::localeAwareCompare_data()
|
||||
return false;
|
||||
};
|
||||
#else
|
||||
// Otherwise, trust that setlocale() reconfigures QString::localeAwareCompare():
|
||||
const auto canTest = [](const char *) { return true; };
|
||||
const auto canTest = [](const char *wanted) {
|
||||
return QLocale(wanted) == QLocale::c() || QLocale(wanted) == QLocale::system().collation();
|
||||
};
|
||||
#endif
|
||||
// Update tailpiece's max-value for this if you add a new locale group
|
||||
int countGroups = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user