qt6-bb10/tests/auto/corelib
Volker Hilsheimer 8c40e8cf12 QTranslator: work around uiLanguages not including lang_Terr variants
Amends 7a7f2547f3, which added the triplet
including the script before the language_Territory name without it. The
truncate-from-the-end algorithm in QTranslator ended up trying the pure
language first, and - if found - ignored any more specific territory-
variant that might be present.

To fix this, replace the truncate-from-the-end algorithm when we try
to find files, and instead create a comprehensive list of fallbacks,
avoiding duplicates as we go along. Insert those fallbacks right after
their base-entry. We then try to find files for each entry, with and
without the prefix.

This fix is needed only in 6.8 and 6.5; from 6.9 onwards, the change to
QLocale::uiLanguages in 84afaafc9c6968dd76fcadc5392065d340543521 fixes
this on the correct level, making kludges in QTranslator unnecessary.

As a drive-by, replace int indices in for-loops with qsizetype.

Fixes: QTBUG-124898
Pick-to: 6.5
Change-Id: Ia3deceb4ed2c6ef5ca0a815cc7b8878bf29ef088
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-10-31 23:15:29 +02:00
..
animation Change license for tests files 2024-02-04 09:56:42 +01:00
global Tests: suppress has_denorm deprecation 2024-09-06 14:38:21 +00:00
io tst_QDebug: extend test with pair<references> 2024-10-28 14:30:11 +00:00
ipc ipctestcommon.h: port away from qsnprintf() 2024-07-30 16:47:32 +00:00
itemmodels QConcatenateTablesProxyModel: react to row and column moves 2024-09-13 17:44:05 +00:00
kernel QTranslator: work around uiLanguages not including lang_Terr variants 2024-10-31 23:15:29 +02:00
mimetypes Update tika-mimetypes.xml from upstream 2024-08-29 04:16:36 +00:00
platform Android: Add tests for QtAbstractListModel 2024-09-19 17:54:39 +00:00
plugin QUuid: restore sorting order of Qt < 6.8 2024-10-22 13:15:24 +00:00
serialization Tests: suppress has_denorm deprecation 2024-09-06 14:38:21 +00:00
text tst_QChar: run it also under QT_RESTRICTED_CAST_FROM_ASCII 2024-10-28 16:30:11 +02:00
thread QThreadPool: fix regression with negative expiryTimeout 2024-10-15 12:45:00 +00:00
time Address problems with date-time parsing near bounds 2024-10-22 18:53:18 +02:00
tools QList: fix std::to_address(QList::iterator) on older compilers 2024-10-29 01:10:27 +00:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00