summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2020-10-09 12:26:19 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2020-10-12 16:53:40 +0200
commit8b0e068847c03c58f510f89c85dcc7a5e4ac7ef4 (patch)
tree7c6f3023b5526e56d3f7e06f5d3b13d4a1fcea28 /src
parent71ad83529e7d2c7828e027666f24470cf86db63e (diff)
Mark QLocale's Language, Country and Script enums as ushort
The code pervasively presumes their values can be held in a ushort, so make sure the compiler knows we expect that to work (and doesn't complain about narrowing when we do convert them to ushort). Change-Id: Idde7be6cceee8a6dae333c5b1d5a0120fec32e4a Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/text/qlocale.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/text/qlocale.h b/src/corelib/text/qlocale.h
index 8b49eb89f9..bb96f45c5f 100644
--- a/src/corelib/text/qlocale.h
+++ b/src/corelib/text/qlocale.h
@@ -74,7 +74,7 @@ class Q_CORE_EXPORT QLocale
public:
// see qlocale_data_p.h for more info on generated data
// GENERATED PART STARTS HERE
- enum Language {
+ enum Language : ushort {
AnyLanguage = 0,
C = 1,
Abkhazian = 2,
@@ -464,7 +464,7 @@ public:
LastLanguage = Silesian
};
- enum Script {
+ enum Script : ushort {
AnyScript = 0,
ArabicScript = 1,
CyrillicScript = 2,
@@ -614,7 +614,7 @@ public:
LastScript = JamoScript
};
- enum Country {
+ enum Country : ushort {
AnyCountry = 0,
Afghanistan = 1,
Albania = 2,