qt6-bb10/tests
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
..
auto QTranslator: work around uiLanguages not including lang_Terr variants 2024-10-31 23:15:29 +02:00
baseline CMake: Make baseline tests standalone projects 2024-07-03 11:42:45 +00:00
benchmarks tst_bench_qobject: Fix stdAllocator case for Windows 2024-10-25 20:52:12 +00:00
global
libfuzzer Complete color space toICC write 2024-05-31 16:24:50 +02:00
manual Add WS_CLIPCHILDREN style to native window in embeddedwindows test 2024-10-07 12:30:27 +00:00
shared Replace incorrect Metal config check in nativewindow.h 2024-05-01 14:24:06 +02:00
testserver Move shbang lines to before copyright headers 2024-05-23 23:58:10 +02:00
CMakeLists.txt
README

README

This directory contains autotests and benchmarks based on Qt Test. In order
to run the autotests reliably, you need to configure a desktop to match the
test environment that these tests are written for.

Linux X11:

   * The user must be logged in to an active desktop; you can't run the
     autotests without a valid DISPLAY that allows X11 connections.

   * The tests are run against a KDE3 or KDE4 desktop.

   * Window manager uses "click to focus", and not "focus follows mouse". Many
     tests move the mouse cursor around and expect this to not affect focus
     and activation.

   * Disable "click to activate", i.e., when a window is opened, the window
     manager should automatically activate it (give it input focus) and not
     wait for the user to click the window.