qt6-bb10/util
Edward Welbourne 06f77ab19c Correct handling of World in mapping MS's zone IDs to IANA ones
The AnyTerritory entries in the zoneDataTable are derived from
territory="ZZ" entries in the upstream CLDR data; the World ones from
territory="001". The latter give the default IANA ID for each MS ID,
the former give an (often legacy) IANA ID for the MS ID, that is not
based on geography. Some of these are being removed at CLDR v46.

The documentation said the ZZ entries have "no known territorial
association", hinting that there may be some (unknown) territorial
association; however, CLDR's inclusion of them is as entries with a
known non-territorial association, so revise the phrasing to reflect
this.

Also document that windowsIdToDefaultIanaId() returns empty when
there is no territory-specific value, and callers can use the
territory-neutral call to get a suitable value in that case. (They
may, however, wish to distinguish this case, to treat it differently,
so I decided not to just return that in place of empty in any case.)

The upstream CLDR tables do have entries for territory 001, so we
should report these if asked for World as territory. Amend the
available zone ID lookup and mapping from MS to IANA functions that
take a territory to duly handle World via the default-data that was
derived from 001 data in CLDR, instead of from the territory-varying
table, from which those were effectively filtered out when generating
the two tables. Update docs to mention this handling of World, for
contrast with that of AnyTerritory.

In the process remove a spurious split-on-space from the MS to default
IANA lookup, asserting there is no space (in a field now stored in the
table for single IANA ID entries, instead of the one for space-joined
lists of them in which it used to be stored, before I noticed it's
always only one ID). There is a matching assertion in the cldr.py code
that extracts the data. Added an assertion to this last, that each
default IANA ID given by CLDR's MS data does in fact also appear as
one of the IANA IDs for at least one territory (potentially ZZ), and
comment in C++ code on why this means we don't need to scan the
windowsDataTable in a few places, where it would just produce
duplicate entries.

On picking to 6.8, removed the timezone_locale addition, only relevant
on 6.9 and later.

[ChangeLog][QtCore][QTimeZone] Corrected handling of QLocale::World
and clarified in docs how QLocale::AnyTerritory is handled when
QTimeZone selects zones by territory.

Task-number: QTBUG-130877
Change-Id: I861c777c68b0cb73a194138fe23fbff839df49e6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit e23dc7c420297fb62db9834a17c59bbf5992dad7)
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-12-04 11:50:36 +01:00
..
accessibilityinspector Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
aglfn Add REUSE.toml files 2024-11-07 08:38:49 +01:00
cmake Bump version to 6.8.2 2024-11-14 15:04:34 +00:00
edid Add reuse ignore 2024-05-15 18:39:47 +02:00
glgen Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
gradientgen CMake: Add PURL and CPE info to 3rd party attribution files 2024-11-15 17:41:43 +01:00
includemocs Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
integrity Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
lexgen Add REUSE.toml files 2024-11-07 08:38:49 +01:00
locale_database Correct handling of World in mapping MS's zone IDs to IANA ones 2024-12-04 11:50:36 +01:00
plugintest Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qfloat16-tables Correct util file to reduce exceptions 2024-02-20 16:22:28 +01:00
testrunner sanitizer-testrunner.py: be verbose about FAILs being ignored 2023-10-18 18:20:14 +02:00
unicode Add REUSE.toml files 2024-11-07 08:38:49 +01:00
wasm wasm: make qtloader.js use FS.createPreloadedFile when preloading 2024-03-14 14:54:53 +00:00
x86simdgen Add REUSE.toml files 2024-11-07 08:38:49 +01:00
xkbdatagen Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
update_public_suffix_list.sh update_public_suffix_list.sh: print suggested topic: 2024-01-31 21:18:47 +01:00