diff options
Diffstat (limited to 'src/corelib/tools/qlocale_p.h')
-rw-r--r-- | src/corelib/tools/qlocale_p.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/corelib/tools/qlocale_p.h b/src/corelib/tools/qlocale_p.h index 42ef00f821..4d5d918878 100644 --- a/src/corelib/tools/qlocale_p.h +++ b/src/corelib/tools/qlocale_p.h @@ -138,6 +138,28 @@ namespace QIcu { #endif +struct QLocaleId +{ + // bypass constructors + static inline QLocaleId fromIds(ushort language, ushort script, ushort country) + { + const QLocaleId localeId = { language, script, country }; + return localeId; + } + + inline bool operator==(QLocaleId other) const + { return language_id == other.language_id && script_id == other.script_id && country_id == other.country_id; } + inline bool operator!=(QLocaleId other) const + { return !operator==(other); } + + QLocaleId withLikelySubtagsAdded() const; + QLocaleId withLikelySubtagsRemoved() const; + + QString bcp47Name() const; + + ushort language_id, script_id, country_id; +}; + struct QLocaleData { public: |