summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qringbuffer.cpp
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2024-11-29 13:17:21 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2024-12-02 17:43:50 +0100
commite23dc7c420297fb62db9834a17c59bbf5992dad7 (patch)
tree40dfab559e8692d38c2586d24c902f4eb08d0860 /src/corelib/tools/qringbuffer.cpp
parent79a74aa7685e587d0ea047181a2648c589fd60c2 (diff)
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. [ChangeLog][QtCore][QTimeZone] Corrected handling of QLocale::World and clarified in docs how QLocale::AnyTerritory is handled when QTimeZone selects zones by territory. Pick-to: 6.8 Task-number: QTBUG-130877 Change-Id: I861c777c68b0cb73a194138fe23fbff839df49e6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qringbuffer.cpp')
0 files changed, 0 insertions, 0 deletions