6a14ad4993
The collection of translations available to us need not have anything to do with whether CLDR has matching data, so preserve the system UI language list's entries as they are, rather than forcing them through the QLocale constructor's exercise of likely sub-tag rules. Instead, simply parse the given locale tags to QLocaleId instances and use these in the likely-subtag processing to determine what other entries to add to the list in addition to those supplied by the operating system. Since going via QLocale did usually supply a territory, that was included in the BCP 47 name, it's now possible for the given entry to lack the language_territory name, so be sure to add that if missing. This incidentally reduces heap traffic and saves a fair deal of hidden likely-subtag processing in calls to the constructor and bcp47Name(). Expand testing of QLocale::uiLanguages(), both plain and system. In the process, cross-link the two closely-related tests, move a comment on one's _data() to the other's, where it really belongs, and add reporting of the actual lists on failure. Enable MySystemLocale to remember the requested locale's ID, before likely sub-tag processing, so that we can make query() report results for language, script and territory as requested, to ensure the fake system locale really does match what was requested. The new german-britain test failed without it, because there is no de-GB locale in CLDR. Task-number: QTBUG-99531 Change-Id: Ide041577772c442a4413e3b9a590e11140c48f49 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> |
||
---|---|---|
.. | ||
auto | ||
baseline | ||
benchmarks | ||
global | ||
libfuzzer | ||
manual | ||
shared | ||
testserver | ||
CMakeLists.txt | ||
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.