qt5base-lts/tests/auto/corelib
Edward Welbourne ab448f731e Handle QCollator with locale C by delegating to QString
Previously, the C locale was treated as English because each back-end
takes the locale's bcp47Name(), which maps C to en. However, the C
locale has its own rules; which QString helpfully implements; so we
can delegate to it in this case. Extended this to sort keys, where
possible. Clean up existing implementations in the process.

Extended tst_QCollator::compare() with some cases to check this. That
required wrapping the test's calls to collator.compare() in a sign
canonicalizer, since it can return any -ve for < or +ve for >, not
just -1 and +1 for these cases (and it'd be rash to hard-code specific
negative and positive values, as they may vary between backends).

[ChangeLog][QtCore][QCollator] Added support for collation in the C
locale, albeit this is only well-defined for ASCII. Collation sort
keys remain unsupported on Darwin.

Fixes: QTBUG-58621
Change-Id: I327010d90f09bd1b1816f5590cb124e3d423e61d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-12-11 19:05:07 +00:00
..
animation Extend blacklisting of tst_qparallelanimationgroup tests to macOS 10.13 2018-09-24 21:13:30 +00:00
codecs Add tests for decoding too-short UTF-8 sequences 2018-09-25 22:14:07 +00:00
global Merge remote-tracking branch 'origin/5.11' into 5.12 2018-11-27 01:00:09 +01:00
io Fix QSettings parsing of spaces after comment lines 2018-12-07 18:53:34 +00:00
itemmodels Fix building tests with -no-gui 2018-10-20 20:38:59 +00:00
kernel Fix a nullptr compile error with gcc 4.8 2018-11-30 14:50:00 +00:00
mimetypes QMimeType: Use default key as fallback for comment() property 2018-11-02 08:27:10 +00:00
plugin Avoid invalid qmake code in macOS-specific pluginloader test 2018-11-30 14:47:29 +00:00
serialization Merge remote-tracking branch 'origin/5.11' into 5.12 2018-11-27 01:00:09 +01:00
statemachine tst_QStateMachine: Don't use unconditional waits 2018-04-04 07:07:40 +00:00
thread Re-enable thread autotests 2018-09-25 22:35:40 +00:00
tools Handle QCollator with locale C by delegating to QString 2018-12-11 19:05:07 +00:00
corelib.pro Create corelib/serialization and move existing file formats into it 2018-01-26 20:59:50 +00:00