summaryrefslogtreecommitdiffstats
path: root/src/corelib/time
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2021-07-06 12:33:05 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2021-07-14 20:59:00 +0200
commit7dec56c6a5ee985f91dd2197225131c028b33650 (patch)
tree03445b73a0e90394e400d9e0d07b35030e3690f6 /src/corelib/time
parent41a5480cc78f9ba04be50c2481172ef86ca64079 (diff)
Make locale ordering transitive
The ordering function used to sort the locale data generated for QLocale attempted to sort the default territory for a given language and script before other territories, but was too tangled for it to be obvious this is what it was doing. The result turned out to be non-transitive. Replace with code that implements the same preference but only applies it where the result is compatible with transitivity. This leads to a shuffling of the order of the Serbian-language locales, which sorts the Cyrillic ones before the Latin ones. This is consistent with my reading of the CLDR data, which fills in Cyrillic and Serbia for Serbian; Serbian/Cyrillic/Serbia did previously sort before all other Serbian variants. Thanks to Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> for discovering the non-transitivity. Pick-to: 6.2 Change-Id: I0ce9f78e620e714f980f32b85b7100ed0f92ad74 Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'src/corelib/time')
-rw-r--r--src/corelib/time/qhijricalendar_data_p.h6
-rw-r--r--src/corelib/time/qjalalicalendar_data_p.h6
-rw-r--r--src/corelib/time/qromancalendar_data_p.h36
3 files changed, 24 insertions, 24 deletions
diff --git a/src/corelib/time/qhijricalendar_data_p.h b/src/corelib/time/qhijricalendar_data_p.h
index 1cdd101ce5..7b83b2ce4a 100644
--- a/src/corelib/time/qhijricalendar_data_p.h
+++ b/src/corelib/time/qhijricalendar_data_p.h
@@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE
// GENERATED PART STARTS HERE
/*
- This part of the file was generated on 2021-04-09 from the
+ This part of the file was generated on 2021-07-06 from the
Common Locale Data Repository v39
http://www.unicode.org/cldr/
@@ -561,13 +561,13 @@ static const QCalendarLocale locale_data[] = {
{ 249, 66, 117, 0, 0, 106, 106, 184, 184,106,106, 78, 78, 26, 26 },// Sardinian/Latin/Italy
{ 251, 66, 160, 0, 0, 106, 106, 184, 184,106,106, 78, 78, 26, 26 },// Sena/Latin/Mozambique
{ 252, 27, 207, 1032, 1122, 1219, 1219, 184, 184, 90, 97, 69, 69, 26, 26 },// Serbian/Cyrillic/Serbia
- { 252, 66, 29, 7959, 8053, 8150, 8150, 184, 184, 94, 97, 72, 72, 26, 26 },// Serbian/Latin/Bosnia And Herzegovina
- { 252, 66, 207, 7959, 8053, 8150, 8150, 184, 184, 94, 97, 72, 72, 26, 26 },// Serbian/Latin/Serbia
{ 252, 27, 29, 1032, 1122, 1219, 1219, 184, 184, 90, 97, 69, 69, 26, 26 },// Serbian/Cyrillic/Bosnia And Herzegovina
{ 252, 27, 126, 1032, 1122, 1219, 1219, 184, 184, 90, 97, 69, 69, 26, 26 },// Serbian/Cyrillic/Kosovo
{ 252, 27, 157, 1032, 1122, 1219, 1219, 184, 184, 90, 97, 69, 69, 26, 26 },// Serbian/Cyrillic/Montenegro
+ { 252, 66, 29, 7959, 8053, 8150, 8150, 184, 184, 94, 97, 72, 72, 26, 26 },// Serbian/Latin/Bosnia And Herzegovina
{ 252, 66, 126, 7959, 8053, 8150, 8150, 184, 184, 94, 97, 72, 72, 26, 26 },// Serbian/Latin/Kosovo
{ 252, 66, 157, 7959, 8053, 8150, 8150, 184, 184, 94, 97, 72, 72, 26, 26 },// Serbian/Latin/Montenegro
+ { 252, 66, 207, 7959, 8053, 8150, 8150, 184, 184, 94, 97, 72, 72, 26, 26 },// Serbian/Latin/Serbia
{ 253, 66, 230, 0, 0, 106, 106, 184, 184,106,106, 78, 78, 26, 26 },// Shambala/Latin/Tanzania
{ 254, 66, 261, 0, 0, 106, 106, 184, 184,106,106, 78, 78, 26, 26 },// Shona/Latin/Zimbabwe
{ 255, 141, 50, 0, 0, 106, 106, 184, 184,106,106, 78, 78, 26, 26 },// Sichuan Yi/Yi/China
diff --git a/src/corelib/time/qjalalicalendar_data_p.h b/src/corelib/time/qjalalicalendar_data_p.h
index caefbf598f..ca22915de9 100644
--- a/src/corelib/time/qjalalicalendar_data_p.h
+++ b/src/corelib/time/qjalalicalendar_data_p.h
@@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE
// GENERATED PART STARTS HERE
/*
- This part of the file was generated on 2021-04-09 from the
+ This part of the file was generated on 2021-07-06 from the
Common Locale Data Repository v39
http://www.unicode.org/cldr/
@@ -561,13 +561,13 @@ static const QCalendarLocale locale_data[] = {
{ 249, 66, 117, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Sardinian/Latin/Italy
{ 251, 66, 160, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Sena/Latin/Mozambique
{ 252, 27, 207, 447, 447, 447, 447, 153, 153, 80, 80, 80, 80, 26, 26 },// Serbian/Cyrillic/Serbia
- { 252, 66, 29, 3513, 3513, 3513, 3513, 153, 153, 80, 80, 80, 80, 26, 26 },// Serbian/Latin/Bosnia And Herzegovina
- { 252, 66, 207, 3513, 3513, 3513, 3513, 153, 153, 80, 80, 80, 80, 26, 26 },// Serbian/Latin/Serbia
{ 252, 27, 29, 447, 447, 447, 447, 153, 153, 80, 80, 80, 80, 26, 26 },// Serbian/Cyrillic/Bosnia And Herzegovina
{ 252, 27, 126, 447, 447, 447, 447, 153, 153, 80, 80, 80, 80, 26, 26 },// Serbian/Cyrillic/Kosovo
{ 252, 27, 157, 447, 447, 447, 447, 153, 153, 80, 80, 80, 80, 26, 26 },// Serbian/Cyrillic/Montenegro
+ { 252, 66, 29, 3513, 3513, 3513, 3513, 153, 153, 80, 80, 80, 80, 26, 26 },// Serbian/Latin/Bosnia And Herzegovina
{ 252, 66, 126, 3513, 3513, 3513, 3513, 153, 153, 80, 80, 80, 80, 26, 26 },// Serbian/Latin/Kosovo
{ 252, 66, 157, 3513, 3513, 3513, 3513, 153, 153, 80, 80, 80, 80, 26, 26 },// Serbian/Latin/Montenegro
+ { 252, 66, 207, 3513, 3513, 3513, 3513, 153, 153, 80, 80, 80, 80, 26, 26 },// Serbian/Latin/Serbia
{ 253, 66, 230, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Shambala/Latin/Tanzania
{ 254, 66, 261, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Shona/Latin/Zimbabwe
{ 255, 141, 50, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Sichuan Yi/Yi/China
diff --git a/src/corelib/time/qromancalendar_data_p.h b/src/corelib/time/qromancalendar_data_p.h
index 46926c45de..647fcfa564 100644
--- a/src/corelib/time/qromancalendar_data_p.h
+++ b/src/corelib/time/qromancalendar_data_p.h
@@ -59,8 +59,8 @@ QT_BEGIN_NAMESPACE
// GENERATED PART STARTS HERE
/*
- This part of the file was generated on 2021-03-12 from the
- Common Locale Data Repository v38
+ This part of the file was generated on 2021-07-06 from the
+ Common Locale Data Repository v39
http://www.unicode.org/cldr/
@@ -561,13 +561,13 @@ static const QCalendarLocale locale_data[] = {
{ 249, 66, 117, 181, 181, 181, 181, 155, 155, 47, 47, 47, 47, 26, 26 },// Sardinian/Latin/Italy
{ 251, 66, 160,31965,31965,32052,32052, 132, 132, 87, 87, 47, 47, 23, 23 },// Sena/Latin/Mozambique
{ 252, 27, 207,32099,32099,32179,32179, 5154, 5154, 80, 80, 47, 47, 23, 23 },// Serbian/Cyrillic/Serbia
- { 252, 66, 29,32226,32226,32306,32306, 5002, 5002, 80, 80, 47, 47, 23, 23 },// Serbian/Latin/Bosnia And Herzegovina
- { 252, 66, 207,32226,32226,32306,32306, 5002, 5002, 80, 80, 47, 47, 23, 23 },// Serbian/Latin/Serbia
{ 252, 27, 29,32099,32099,32179,32179, 5154, 5154, 80, 80, 47, 47, 23, 23 },// Serbian/Cyrillic/Bosnia And Herzegovina
- { 252, 27, 126,32099,32099,32353,32353, 5154, 5154, 80, 80, 49, 49, 23, 23 },// Serbian/Cyrillic/Kosovo
- { 252, 27, 157,32099,32099,32353,32353, 5154, 5154, 80, 80, 49, 49, 23, 23 },// Serbian/Cyrillic/Montenegro
- { 252, 66, 126,32226,32226,32402,32402, 5002, 5002, 80, 80, 49, 49, 23, 23 },// Serbian/Latin/Kosovo
- { 252, 66, 157,32226,32226,32402,32402, 5002, 5002, 80, 80, 49, 49, 23, 23 },// Serbian/Latin/Montenegro
+ { 252, 27, 126,32099,32099,32226,32226, 5154, 5154, 80, 80, 49, 49, 23, 23 },// Serbian/Cyrillic/Kosovo
+ { 252, 27, 157,32099,32099,32226,32226, 5154, 5154, 80, 80, 49, 49, 23, 23 },// Serbian/Cyrillic/Montenegro
+ { 252, 66, 29,32275,32275,32355,32355, 5002, 5002, 80, 80, 47, 47, 23, 23 },// Serbian/Latin/Bosnia And Herzegovina
+ { 252, 66, 126,32275,32275,32402,32402, 5002, 5002, 80, 80, 49, 49, 23, 23 },// Serbian/Latin/Kosovo
+ { 252, 66, 157,32275,32275,32402,32402, 5002, 5002, 80, 80, 49, 49, 23, 23 },// Serbian/Latin/Montenegro
+ { 252, 66, 207,32275,32275,32355,32355, 5002, 5002, 80, 80, 47, 47, 23, 23 },// Serbian/Latin/Serbia
{ 253, 66, 230,32451,32451,22360,22360, 132, 132, 83, 83, 47, 47, 23, 23 },// Shambala/Latin/Tanzania
{ 254, 66, 261,32534,32534,32633,32633,32680,32680, 99, 99, 47, 47, 23, 23 },// Shona/Latin/Zimbabwe
{ 255, 141, 50,32703,32703,32703,32703, 155, 155, 37, 37, 37, 37, 26, 26 },// Sichuan Yi/Yi/China
@@ -2303,16 +2303,16 @@ static const char16_t months_data[] = {
0x440, 0x3b, 0x43d, 0x43e, 0x432, 0x435, 0x43c, 0x431, 0x430, 0x440, 0x3b, 0x434, 0x435, 0x446, 0x435, 0x43c, 0x431, 0x430, 0x440, 0x458,
0x430, 0x43d, 0x3b, 0x444, 0x435, 0x431, 0x3b, 0x43c, 0x430, 0x440, 0x3b, 0x430, 0x43f, 0x440, 0x3b, 0x43c, 0x430, 0x458, 0x3b, 0x458,
0x443, 0x43d, 0x3b, 0x458, 0x443, 0x43b, 0x3b, 0x430, 0x432, 0x433, 0x3b, 0x441, 0x435, 0x43f, 0x3b, 0x43e, 0x43a, 0x442, 0x3b, 0x43d,
-0x43e, 0x432, 0x3b, 0x434, 0x435, 0x446, 0x6a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72,
-0x3b, 0x6d, 0x61, 0x72, 0x74, 0x3b, 0x61, 0x70, 0x72, 0x69, 0x6c, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x6a, 0x75, 0x6e, 0x3b,
-0x6a, 0x75, 0x6c, 0x3b, 0x61, 0x76, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x72,
-0x3b, 0x6f, 0x6b, 0x74, 0x6f, 0x62, 0x61, 0x72, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x64, 0x65,
-0x63, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x6a, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x62, 0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x61, 0x70,
-0x72, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x6a, 0x75, 0x6e, 0x3b, 0x6a, 0x75, 0x6c, 0x3b, 0x61, 0x76, 0x67, 0x3b, 0x73, 0x65,
-0x70, 0x3b, 0x6f, 0x6b, 0x74, 0x3b, 0x6e, 0x6f, 0x76, 0x3b, 0x64, 0x65, 0x63, 0x458, 0x430, 0x43d, 0x3b, 0x444, 0x435, 0x431,
-0x3b, 0x43c, 0x430, 0x440, 0x442, 0x3b, 0x430, 0x43f, 0x440, 0x3b, 0x43c, 0x430, 0x458, 0x3b, 0x458, 0x443, 0x43d, 0x3b, 0x458, 0x443,
-0x43b, 0x3b, 0x430, 0x432, 0x433, 0x3b, 0x441, 0x435, 0x43f, 0x442, 0x3b, 0x43e, 0x43a, 0x442, 0x3b, 0x43d, 0x43e, 0x432, 0x3b, 0x434,
-0x435, 0x446, 0x6a, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x62, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x3b, 0x61, 0x70, 0x72, 0x3b, 0x6d,
+0x43e, 0x432, 0x3b, 0x434, 0x435, 0x446, 0x458, 0x430, 0x43d, 0x3b, 0x444, 0x435, 0x431, 0x3b, 0x43c, 0x430, 0x440, 0x442, 0x3b, 0x430,
+0x43f, 0x440, 0x3b, 0x43c, 0x430, 0x458, 0x3b, 0x458, 0x443, 0x43d, 0x3b, 0x458, 0x443, 0x43b, 0x3b, 0x430, 0x432, 0x433, 0x3b, 0x441,
+0x435, 0x43f, 0x442, 0x3b, 0x43e, 0x43a, 0x442, 0x3b, 0x43d, 0x43e, 0x432, 0x3b, 0x434, 0x435, 0x446, 0x6a, 0x61, 0x6e, 0x75, 0x61,
+0x72, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x3b, 0x61, 0x70, 0x72, 0x69, 0x6c,
+0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x6a, 0x75, 0x6e, 0x3b, 0x6a, 0x75, 0x6c, 0x3b, 0x61, 0x76, 0x67, 0x75, 0x73, 0x74, 0x3b,
+0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x6f, 0x6b, 0x74, 0x6f, 0x62, 0x61, 0x72, 0x3b, 0x6e, 0x6f,
+0x76, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x6a, 0x61, 0x6e, 0x3b, 0x66,
+0x65, 0x62, 0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x61, 0x70, 0x72, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x6a, 0x75, 0x6e, 0x3b, 0x6a,
+0x75, 0x6c, 0x3b, 0x61, 0x76, 0x67, 0x3b, 0x73, 0x65, 0x70, 0x3b, 0x6f, 0x6b, 0x74, 0x3b, 0x6e, 0x6f, 0x76, 0x3b, 0x64,
+0x65, 0x63, 0x6a, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x62, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x3b, 0x61, 0x70, 0x72, 0x3b, 0x6d,
0x61, 0x6a, 0x3b, 0x6a, 0x75, 0x6e, 0x3b, 0x6a, 0x75, 0x6c, 0x3b, 0x61, 0x76, 0x67, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x3b,
0x6f, 0x6b, 0x74, 0x3b, 0x6e, 0x6f, 0x76, 0x3b, 0x64, 0x65, 0x63, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x69, 0x3b, 0x46,
0x65, 0x62, 0x6c, 0x75, 0x61, 0x6c, 0x69, 0x3b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x41, 0x70, 0x6c, 0x69, 0x6c, 0x69,