Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QLocalePrivate Class Reference

#include <qlocale_p.h>

+ Collaboration diagram for QLocalePrivate:

Public Member Functions

constexpr QLocalePrivate (const QLocaleData *data, qsizetype index, QLocale::NumberOptions numberOptions=QLocale::DefaultNumberOptions, int refs=0)
 
quint16 languageId () const
 
quint16 territoryId () const
 
QByteArray bcp47Name (char separator='-') const
 
std::array< char, 4 > languageCode (QLocale::LanguageCodeTypes codeTypes=QLocale::AnyLanguageCode) const
 
QLatin1StringView scriptCode () const
 
QLatin1StringView territoryCode () const
 
QLocale::MeasurementSystem measurementSystem () const
 

Static Public Member Functions

static const QLocalePrivateget (const QLocale &l)
 
static std::array< char, 4 > languageToCode (QLocale::Language language, QLocale::LanguageCodeTypes codeTypes=QLocale::AnyLanguageCode)
 
static QLatin1StringView scriptToCode (QLocale::Script script)
 
static QLatin1StringView territoryToCode (QLocale::Territory territory)
 
static QLocale::Language codeToLanguage (QStringView code, QLocale::LanguageCodeTypes codeTypes=QLocale::AnyLanguageCode) noexcept
 
static QLocale::Script codeToScript (QStringView code) noexcept
 
static QLocale::Territory codeToTerritory (QStringView code) noexcept
 

Public Attributes

const QLocaleData *const m_data
 
QBasicAtomicInt ref
 
qsizetype m_index
 
QLocale::NumberOptions m_numberOptions
 

Static Public Attributes

static QBasicAtomicInt s_generation = Q_BASIC_ATOMIC_INITIALIZER(0)
 

Detailed Description

Definition at line 490 of file qlocale_p.h.

Constructor & Destructor Documentation

◆ QLocalePrivate()

constexpr QLocalePrivate::QLocalePrivate ( const QLocaleData * data,
qsizetype index,
QLocale::NumberOptions numberOptions = QLocale::DefaultNumberOptions,
int refs = 0 )
inlineconstexpr

Definition at line 493 of file qlocale_p.h.

Member Function Documentation

◆ bcp47Name()

QByteArray QLocalePrivate::bcp47Name ( char separator = '-') const

Definition at line 458 of file qlocale.cpp.

References QLocale::AnyLanguage, QLocale::C, QLocaleData::id(), m_data, QLocaleId::name(), QByteArray(), QByteArrayLiteral, and QLocaleId::withLikelySubtagsRemoved().

Referenced by QLocale::bcp47Name(), QLocale::toLower(), and QLocale::toUpper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ codeToLanguage()

QT_BEGIN_INCLUDE_NAMESPACE QT_END_INCLUDE_NAMESPACE QLocale::Language QLocalePrivate::codeToLanguage ( QStringView code,
QLocale::LanguageCodeTypes codeTypes = QLocale::AnyLanguageCode )
staticnoexcept

Definition at line 95 of file qlocale.cpp.

References QLocale::AnyLanguage, QLocale::Filipino, QLocale::Hebrew, i, QLocale::Indonesian, QLocale::ISO639Part1, QLocale::ISO639Part2B, QLocale::ISO639Part2T, QLocale::ISO639Part3, languageCodeList, QLocale::LegacyLanguageCode, QLocale::NorwegianBokmal, QLocale::Romanian, QLocale::Serbian, QString::size(), QString::toLower(), QString::unicode(), and QLocale::Yiddish.

Referenced by QLocale::codeToLanguage(), codeToLanguage(), and QLocaleId::fromName().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ codeToScript()

QLocale::Script QLocalePrivate::codeToScript ( QStringView code)
staticnoexcept

Definition at line 167 of file qlocale.cpp.

References QLocale::AnyScript, c2, i, QLocale::LastScript, script_code_list, QString::size(), QString::toLatin1(), QString::toLower(), and QString::toUpper().

Referenced by QLocale::codeToScript(), and QLocaleId::fromName().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ codeToTerritory()

QLocale::Territory QLocalePrivate::codeToTerritory ( QStringView code)
staticnoexcept

Definition at line 187 of file qlocale.cpp.

References QLocale::AnyTerritory, QString::size(), territory_code_list, QString::toUpper(), and QString::unicode().

Referenced by QLocale::codeToTerritory(), QLocaleId::fromName(), and loadTzTimeZones().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get()

static const QLocalePrivate * QLocalePrivate::get ( const QLocale & l)
inlinestatic

Definition at line 514 of file qlocale_p.h.

Referenced by QCollatorPrivate::init().

+ Here is the caller graph for this function:

◆ languageCode()

std::array< char, 4 > QLocalePrivate::languageCode ( QLocale::LanguageCodeTypes codeTypes = QLocale::AnyLanguageCode) const
inline

Definition at line 505 of file qlocale_p.h.

References languageToCode(), and m_data.

Referenced by QLocale::name().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ languageId()

quint16 QLocalePrivate::languageId ( ) const
inline

Definition at line 499 of file qlocale_p.h.

References m_data.

Referenced by QLocale::language().

+ Here is the caller graph for this function:

◆ languageToCode()

std::array< char, 4 > QLocalePrivate::languageToCode ( QLocale::Language language,
QLocale::LanguageCodeTypes codeTypes = QLocale::AnyLanguageCode )
static

Definition at line 206 of file qlocale.cpp.

References QLocale::AnyLanguage, QLocale::C, i, QLocale::ISO639Part1, QLocale::ISO639Part2B, QLocale::ISO639Part2T, QLocale::ISO639Part3, languageCodeList, and QLocale::LastLanguage.

Referenced by languageCode(), and QLocale::languageToCode().

+ Here is the caller graph for this function:

◆ measurementSystem()

QLocale::MeasurementSystem QLocalePrivate::measurementSystem ( ) const

Definition at line 3284 of file qlocale.cpp.

References ImperialMeasurementSystems, m_data, and QLocale::MetricSystem.

Referenced by QLocale::measurementSystem().

+ Here is the caller graph for this function:

◆ scriptCode()

QLatin1StringView QLocalePrivate::scriptCode ( ) const
inline

Definition at line 509 of file qlocale_p.h.

References m_data, and scriptToCode().

+ Here is the call graph for this function:

◆ scriptToCode()

QLatin1StringView QLocalePrivate::scriptToCode ( QLocale::Script script)
static

Definition at line 231 of file qlocale.cpp.

References QLocale::AnyScript, QLocale::LastScript, and script_code_list.

Referenced by scriptCode(), and QLocale::scriptToCode().

+ Here is the caller graph for this function:

◆ territoryCode()

QLatin1StringView QLocalePrivate::territoryCode ( ) const
inline

Definition at line 511 of file qlocale_p.h.

References m_data, and territoryToCode().

Referenced by QLocale::name().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ territoryId()

quint16 QLocalePrivate::territoryId ( ) const
inline

Definition at line 500 of file qlocale_p.h.

References m_data.

Referenced by QLocale::territory().

+ Here is the caller graph for this function:

◆ territoryToCode()

QLatin1StringView QLocalePrivate::territoryToCode ( QLocale::Territory territory)
static

Definition at line 239 of file qlocale.cpp.

References QLocale::AnyTerritory, QLocale::LastTerritory, and territory_code_list.

Referenced by territoryCode(), and QLocale::territoryToCode().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_data

◆ m_index

qsizetype QLocalePrivate::m_index

Definition at line 531 of file qlocale_p.h.

◆ m_numberOptions

QLocale::NumberOptions QLocalePrivate::m_numberOptions

◆ ref

QBasicAtomicInt QLocalePrivate::ref

Definition at line 530 of file qlocale_p.h.

◆ s_generation

Q_CONSTINIT QBasicAtomicInt QLocalePrivate::s_generation = Q_BASIC_ATOMIC_INITIALIZER(0)
static

The documentation for this class was generated from the following files: