Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QSystemLocale Class Reference

#include <qlocale_p.h>

+ Inheritance diagram for QSystemLocale:
+ Collaboration diagram for QSystemLocale:

Classes

struct  CurrencyToStringArgument
 

Public Types

enum  QueryType {
  LanguageId , TerritoryId , DecimalPoint , Grouping ,
  GroupSeparator , ZeroDigit , NegativeSign , DateFormatLong ,
  DateFormatShort , TimeFormatLong , TimeFormatShort , DayNameLong ,
  DayNameShort , DayNameNarrow , MonthNameLong , MonthNameShort ,
  MonthNameNarrow , DateToStringLong , DateToStringShort , TimeToStringLong ,
  TimeToStringShort , DateTimeFormatLong , DateTimeFormatShort , DateTimeToStringLong ,
  DateTimeToStringShort , MeasurementSystem , PositiveSign , AMText ,
  PMText , FirstDayOfWeek , Weekdays , CurrencySymbol ,
  CurrencyToString , Collation , UILanguages , StringToStandardQuotation ,
  StringToAlternateQuotation , ScriptId , ListToSeparatedString , LocaleChanged ,
  NativeLanguageName , NativeTerritoryName , StandaloneMonthNameLong , StandaloneMonthNameShort ,
  StandaloneMonthNameNarrow , StandaloneDayNameLong , StandaloneDayNameShort , StandaloneDayNameNarrow
}
 

Public Member Functions

 QSystemLocale ()
 
virtual ~QSystemLocale ()
 
virtual QVariant query (QueryType type, QVariant &&in=QVariant()) const
 
virtual QLocale fallbackLocale () const
 
qsizetype fallbackLocaleIndex () const
 

Protected Member Functions

const QSharedDataPointer< QLocalePrivatelocaleData (const QLocale &locale) const
 

Detailed Description

Definition at line 107 of file qlocale_p.h.

Member Enumeration Documentation

◆ QueryType

Enumerator
LanguageId 
TerritoryId 
DecimalPoint 
Grouping 
GroupSeparator 
ZeroDigit 
NegativeSign 
DateFormatLong 
DateFormatShort 
TimeFormatLong 
TimeFormatShort 
DayNameLong 
DayNameShort 
DayNameNarrow 
MonthNameLong 
MonthNameShort 
MonthNameNarrow 
DateToStringLong 
DateToStringShort 
TimeToStringLong 
TimeToStringShort 
DateTimeFormatLong 
DateTimeFormatShort 
DateTimeToStringLong 
DateTimeToStringShort 
MeasurementSystem 
PositiveSign 
AMText 
PMText 
FirstDayOfWeek 
Weekdays 
CurrencySymbol 
CurrencyToString 
Collation 
UILanguages 
StringToStandardQuotation 
StringToAlternateQuotation 
ScriptId 
ListToSeparatedString 
LocaleChanged 
NativeLanguageName 
NativeTerritoryName 
StandaloneMonthNameLong 
StandaloneMonthNameShort 
StandaloneMonthNameNarrow 
StandaloneDayNameLong 
StandaloneDayNameShort 
StandaloneDayNameNarrow 

Definition at line 125 of file qlocale_p.h.

Constructor & Destructor Documentation

◆ QSystemLocale()

QSystemLocale::QSystemLocale ( )

Constructs a QSystemLocale object.

The constructor will automatically install this object as the system locale. It and the destructor maintain a stack of system locales, with the most-recently-created instance (that hasn't yet been deleted) used as the system locale. This is only intended as a way to let a platform plugin install its own system locale, overriding what might otherwise be provided for its class of platform (as Android does, differing from Linux), and to let tests transiently override the system or plugin-supplied one. As such, there should not be diverse threads creating and destroying QSystemLocale instances concurrently, so no attempt is made at thread-safety in managing the stack.

This constructor also resets the flag that'll prompt QLocale::system() to re-initialize its data, so that instantiating a QSystemLocale (even transiently) triggers a refresh of the system locale's data. This is exploited by some test code.

Definition at line 817 of file qlocale.cpp.

◆ ~QSystemLocale()

QSystemLocale::~QSystemLocale ( )
virtual

Deletes the object.

Definition at line 828 of file qlocale.cpp.

Member Function Documentation

◆ fallbackLocale()

QLocale QSystemLocale::fallbackLocale ( ) const
virtual

Reimplemented in QAndroidSystemLocale.

Definition at line 581 of file qlocale_mac.mm.

◆ fallbackLocaleIndex()

qsizetype QSystemLocale::fallbackLocaleIndex ( ) const
inline

Definition at line 568 of file qlocale_p.h.

◆ localeData()

const QSharedDataPointer< QLocalePrivate > QSystemLocale::localeData ( const QLocale & locale) const
inlineprotected

Definition at line 181 of file qlocale_p.h.

◆ query()

QVariant QSystemLocale::query ( QueryType type,
QVariant && in = QVariant() ) const
virtual

Reimplemented in QAndroidSystemLocale.

Definition at line 606 of file qlocale_mac.mm.


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