qt6-bb10/tests/auto
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
..
bic/data Add 6.8.0 binary compatibility file 2024-10-17 19:30:33 +00:00
cmake Bump version to 6.8.1 2024-09-19 07:20:47 +03:00
concurrent tst_QtConcurrentThreadEngine: fix UB (uninitialized boolean) 2024-07-06 10:17:50 +00:00
corelib QTranslator: work around uiLanguages not including lang_Terr variants 2024-10-31 23:15:29 +02:00
dbus QtDBus: disallow sending method calls without destinations on a bus 2024-10-22 07:17:08 +00:00
gui QFileSystemModel on Windows: consistently trim spaces and dots 2024-10-29 17:42:12 +00:00
guiapplauncher Convert "Color Editor Factory" Example to snippets 2024-04-19 13:39:41 +02:00
network Http: fix how we treat must-revalidate 2024-10-31 15:35:47 +00:00
opengl tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
other Accessibility on macOS: make treeview test more reliable 2024-08-22 04:40:28 +00:00
printsupport tests: blacklist tst_QPrinter::testPrintPreviewDialog() 2024-08-12 09:43:38 +00:00
shared Introduce flag to use typographical line metrics for fonts 2024-05-31 19:30:53 +02:00
sql Tests/QSqlQuery: fix tst_QSqlQuery::lastInsertId() for PostgreSQL 2024-10-31 19:46:55 +00:00
testlib tst_selftests: disable Valgrind tests with AVX512/AVX10 2024-10-29 23:52:25 +00:00
tools moc: add a test for Q_FLAG getter/setter on integers 2024-09-24 20:30:14 +00:00
wasm CMake: Fix PUBLIC_LIBRARIES option is deprecated in tests warning 2024-10-30 10:57:15 +01:00
widgets Remove Motif style test handling from tst_QGraphicsView::scrollBarRanges 2024-10-23 23:01:00 +00:00
xml QtXml: be systematic about feature dom 2024-08-29 18:21:29 +00:00
CMakeLists.txt tst_QSettings: port to QTEST_THROW_ON_FAIL 2024-06-27 06:06:02 +00:00
network-helpers.h Fix prior change: no need for check when OpenSSL is active backend 2024-10-26 00:04:46 +00:00
network-settings.h Change license for tests files 2024-02-04 09:56:42 +01:00