![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <qlocale_p.h>
Public Member Functions | |
bool | operator== (QLocaleId other) const noexcept |
bool | operator!= (QLocaleId other) const noexcept |
bool | isValid () const noexcept |
bool | matchesAll () const noexcept |
bool | acceptLanguage (quint16 lang) const noexcept |
bool | acceptScriptTerritory (QLocaleId other) const noexcept |
QLocaleId | withLikelySubtagsAdded () const noexcept |
Fill in blank fields of a locale ID. | |
QLocaleId | withLikelySubtagsRemoved () const noexcept |
QByteArray | name (char separator='-') const |
Static Public Member Functions | |
static Q_AUTOTEST_EXPORT QLocaleId | fromName (QStringView name) noexcept |
Public Attributes | |
ushort | language_id = 0 |
ushort | script_id = 0 |
ushort | territory_id = 0 |
Definition at line 189 of file qlocale_p.h.
|
inlinenodiscardnoexcept |
Definition at line 206 of file qlocale_p.h.
References language_id.
|
inlinenodiscardnoexcept |
Definition at line 212 of file qlocale_p.h.
References script_id, and territory_id.
Referenced by contradicts().
|
staticnodiscardnoexcept |
Definition at line 694 of file qlocale.cpp.
|
inlinenodiscardnoexcept |
Definition at line 196 of file qlocale_p.h.
|
inlinenodiscardnoexcept |
Definition at line 201 of file qlocale_p.h.
References language_id, script_id, and territory_id.
Referenced by withLikelySubtagsAdded().
|
nodiscard |
Definition at line 434 of file qlocale.cpp.
References language_id, LanguageCodeEntry::part1, LanguageCodeEntry::part2B, and LanguageCodeEntry::part3.
|
inlinenodiscardnoexcept |
Definition at line 194 of file qlocale_p.h.
References operator==().
|
inlinenodiscardnoexcept |
Definition at line 192 of file qlocale_p.h.
References language_id, script_id, and territory_id.
Referenced by operator!=(), and withLikelySubtagsRemoved().
|
nodiscardnoexcept |
Fill in blank fields of a locale ID.
An ID in which some fields are zero stands for any locale that agrees with it in its non-zero fields. CLDR's likely-subtag data is meant to help us chose which candidate to prefer. (Note, however, that CLDR does have some cases where it maps an ID to a "best match" for which CLDR does not provide data, even though there are locales for which CLDR does provide data that do match the given ID. It's telling us, unhelpfully but truthfully, what locale would (most likely) be meant by (someone using) the combination requested, even when that locale isn't yet supported.) It may also map an obsolete or generic tag to a modern or more specific replacement, possibly filling in some of the other fields in the process (presently only for countries). Note that some fields of the result may remain blank, but there is no more specific recommendation available.
For the formal specification, see https://www.unicode.org/reports/tr35/#Likely_Subtags
Definition at line 321 of file qlocale.cpp.
References language_id, likely_subtags, matchesAll(), script_id, and territory_id.
Referenced by QLocaleData::findLocaleIndex(), and withLikelySubtagsRemoved().
|
nodiscardnoexcept |
Definition at line 410 of file qlocale.cpp.
References language_id, operator==(), script_id, territory_id, and withLikelySubtagsAdded().
Referenced by QLocalePrivate::bcp47Name().
ushort QLocaleId::language_id = 0 |
Definition at line 223 of file qlocale_p.h.
Referenced by acceptLanguage(), contradicts(), QLocaleData::findLocaleIndex(), matchesAll(), name(), operator==(), withLikelySubtagsAdded(), and withLikelySubtagsRemoved().
ushort QLocaleId::script_id = 0 |
Definition at line 223 of file qlocale_p.h.
Referenced by acceptScriptTerritory(), QLocaleData::findLocaleIndex(), matchesAll(), operator==(), withLikelySubtagsAdded(), and withLikelySubtagsRemoved().
ushort QLocaleId::territory_id = 0 |
Definition at line 223 of file qlocale_p.h.
Referenced by acceptScriptTerritory(), QLocaleData::findLocaleIndex(), matchesAll(), operator==(), withLikelySubtagsAdded(), and withLikelySubtagsRemoved().