Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qlocale_mac.mm File Reference
#include "qlocale_p.h"
#include "qstringlist.h"
#include "qvariant.h"
#include "qdatetime.h"
#include "private/qstringiterator_p.h"
#include "private/qgregoriancalendar_p.h"
#include <QtCore/qloggingcategory.h>
#include <QtCore/qcoreapplication.h>
+ Include dependency graph for qlocale_mac.mm:

Go to the source code of this file.

Functions

static void printLocalizationInformation ()
 
 Q_COREAPP_STARTUP_FUNCTION (printLocalizationInformation)
 
static QString getMacLocaleName ()
 
static QVariant macMonthName (int month, QSystemLocale::QueryType type)
 
static QVariant macDayName (int day, QSystemLocale::QueryType type)
 
static QString macZeroDigit ()
 
static QString zeroPad (QString &&number, qsizetype minDigits, const QString &zero)
 
static QString trimTwoDigits (QString &&number)
 
static QString fourDigitYear (int year, const QString &zero)
 
static QString macDateToStringImpl (QDate date, CFDateFormatterStyle style)
 
static QVariant macDateToString (QDate date, bool short_format)
 
static QVariant macTimeToString (QTime time, bool short_format)
 
static QVariant macToQtFormat (QStringView sys_fmt)
 
static QVariant getMacDateFormat (CFDateFormatterStyle style)
 
static QVariant getMacTimeFormat (CFDateFormatterStyle style)
 
static QVariant getCFLocaleValue (CFStringRef key)
 
static QVariant macMeasurementSystem ()
 
static quint8 macFirstDayOfWeek ()
 
static QVariant macCurrencySymbol (QLocale::CurrencySymbolFormat format)
 
static QVariant macFormatCurrency (const QSystemLocale::CurrencyToStringArgument &arg)
 
static QVariant macQuoteString (QSystemLocale::QueryType type, QStringView str)
 
template<auto CodeToValueFunction>
static QVariant getLocaleValue (CFStringRef key)
 
static QLocale::Language codeToLanguage (QStringView s)
 

Function Documentation

◆ codeToLanguage()

static QLocale::Language codeToLanguage ( QStringView  s)
static

Definition at line 569 of file qlocale_mac.mm.

References QLocalePrivate::codeToLanguage().

+ Here is the call graph for this function:

◆ fourDigitYear()

static QString fourDigitYear ( int  year,
const QString zero 
)
static

Definition at line 223 of file qlocale_mac.mm.

References text, zero, and zeroPad().

Referenced by macDateToString().

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

◆ getCFLocaleValue()

static QVariant getCFLocaleValue ( CFStringRef  key)
static

Definition at line 441 of file qlocale_mac.mm.

Referenced by getLocaleValue(), and QSystemLocale::query().

+ Here is the caller graph for this function:

◆ getLocaleValue()

template<auto CodeToValueFunction>
static QVariant getLocaleValue ( CFStringRef  key)
static

Definition at line 555 of file qlocale_mac.mm.

References getCFLocaleValue(), and QString::isNull().

+ Here is the call graph for this function:

◆ getMacDateFormat()

static QVariant getMacDateFormat ( CFDateFormatterStyle  style)
static

Definition at line 425 of file qlocale_mac.mm.

References macToQtFormat().

Referenced by QSystemLocale::query().

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

◆ getMacLocaleName()

static QString getMacLocaleName ( )
static

Definition at line 61 of file qlocale_mac.mm.

Referenced by QSystemLocale::fallbackLocale().

+ Here is the caller graph for this function:

◆ getMacTimeFormat()

static QVariant getMacTimeFormat ( CFDateFormatterStyle  style)
static

Definition at line 433 of file qlocale_mac.mm.

References macToQtFormat().

Referenced by QSystemLocale::query().

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

◆ macCurrencySymbol()

static QVariant macCurrencySymbol ( QLocale::CurrencySymbolFormat  format)
static

Definition at line 471 of file qlocale_mac.mm.

References QLocale::CurrencyDisplayName, QLocale::CurrencyIsoCode, and QLocale::CurrencySymbol.

Referenced by QSystemLocale::query().

+ Here is the caller graph for this function:

◆ macDateToString()

static QVariant macDateToString ( QDate  date,
bool  short_format 
)
static

Definition at line 252 of file qlocale_mac.mm.

References QString::contains(), date, QDate::day(), fourDigitYear(), macDateToStringImpl(), macZeroDigit(), matcher, QDate::month(), Q_ASSERT, qWarning, QString::replace(), text, trimTwoDigits(), QDate::year(), QGregorianCalendar::yearSharingWeekDays(), and zero.

Referenced by QSystemLocale::query().

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

◆ macDateToStringImpl()

static QString macDateToStringImpl ( QDate  date,
CFDateFormatterStyle  style 
)
static

Definition at line 237 of file qlocale_mac.mm.

References date, and text.

Referenced by macDateToString().

+ Here is the caller graph for this function:

◆ macDayName()

static QVariant macDayName ( int  day,
QSystemLocale::QueryType  type 
)
static

Definition at line 112 of file qlocale_mac.mm.

References QSystemLocale::DayNameLong, QSystemLocale::DayNameNarrow, QSystemLocale::DayNameShort, qWarning, QSystemLocale::StandaloneDayNameLong, QSystemLocale::StandaloneDayNameNarrow, and QSystemLocale::StandaloneDayNameShort.

Referenced by QSystemLocale::query().

+ Here is the caller graph for this function:

◆ macFirstDayOfWeek()

static quint8 macFirstDayOfWeek ( )
static

Definition at line 462 of file qlocale_mac.mm.

References calendar.

Referenced by QSystemLocale::query().

+ Here is the caller graph for this function:

◆ macFormatCurrency()

static QVariant macFormatCurrency ( const QSystemLocale::CurrencyToStringArgument arg)
static

Definition at line 491 of file qlocale_mac.mm.

References arg.

Referenced by QSystemLocale::query().

+ Here is the caller graph for this function:

◆ macMeasurementSystem()

static QVariant macMeasurementSystem ( )
static

Definition at line 450 of file qlocale_mac.mm.

References QLocale::ImperialSystem, and QLocale::MetricSystem.

Referenced by QSystemLocale::query().

+ Here is the caller graph for this function:

◆ macMonthName()

static QVariant macMonthName ( int  month,
QSystemLocale::QueryType  type 
)
static

Definition at line 68 of file qlocale_mac.mm.

References QSystemLocale::MonthNameLong, QSystemLocale::MonthNameNarrow, QSystemLocale::MonthNameShort, qWarning, QSystemLocale::StandaloneMonthNameLong, QSystemLocale::StandaloneMonthNameNarrow, and QSystemLocale::StandaloneMonthNameShort.

Referenced by QSystemLocale::query().

+ Here is the caller graph for this function:

◆ macQuoteString()

static QVariant macQuoteString ( QSystemLocale::QueryType  type,
QStringView  str 
)
static

Definition at line 527 of file qlocale_mac.mm.

References begin(), str, QSystemLocale::StringToAlternateQuotation, and QSystemLocale::StringToStandardQuotation.

Referenced by QSystemLocale::query().

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

◆ macTimeToString()

static QVariant macTimeToString ( QTime  time,
bool  short_format 
)
static

Definition at line 290 of file qlocale_mac.mm.

References QDate::currentDate(), text, and time.

Referenced by QSystemLocale::query().

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

◆ macToQtFormat()

static QVariant macToQtFormat ( QStringView  sys_fmt)
static

Definition at line 308 of file qlocale_mac.mm.

References QStringView::at(), QVariant::fromValue(), i, QStringView::mid(), qt_readEscapedFormatString(), qt_repeatCount(), QStringView::size(), text, and QChar::unicode().

Referenced by getMacDateFormat(), and getMacTimeFormat().

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

◆ macZeroDigit()

static QString macZeroDigit ( )
static

Definition at line 155 of file qlocale_mac.mm.

References QString::isNull(), and qCDebug.

Referenced by macDateToString(), and QSystemLocale::query().

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

◆ printLocalizationInformation()

static void printLocalizationInformation ( )
static

Definition at line 30 of file qlocale_mac.mm.

References Q_UNUSED, qCDebug, str, QLocale::system(), and QLocale::uiLanguages().

+ Here is the call graph for this function:

◆ Q_COREAPP_STARTUP_FUNCTION()

Q_COREAPP_STARTUP_FUNCTION ( printLocalizationInformation  )

◆ trimTwoDigits()

static QString trimTwoDigits ( QString &&  number)
static

Definition at line 200 of file qlocale_mac.mm.

References QChar::isDigit(), it, number, and Q_ASSERT.

Referenced by macDateToString().

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

◆ zeroPad()

static QString zeroPad ( QString &&  number,
qsizetype  minDigits,
const QString zero 
)
static

Definition at line 179 of file qlocale_mac.mm.

References digits(), insert(), QChar::isDigit(), it, number, Q_ASSERT, and zero.

Referenced by fourDigitYear().

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