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
qlocale_mac.mm File Reference

(dd56558ecdebc2415990521b08286324d430ac5c)

#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 579 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 225 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 451 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 565 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 435 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 63 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 443 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 481 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 254 of file qlocale_mac.mm.

References QString::contains(), date, QDate::day(), fourDigitYear(), macDateToStringImpl(), macZeroDigit(), matcher, QDate::month(), Q_ASSERT, qWarning, 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 239 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 114 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 472 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 501 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 460 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 70 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 537 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 292 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 310 of file qlocale_mac.mm.

References QVariant::fromValue(), i, qt_readEscapedFormatString(), qt_repeatCount(), and text.

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 157 of file qlocale_mac.mm.

References qCDebug.

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

+ 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, and QLocale::system().

+ 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 202 of file qlocale_mac.mm.

References it, number, and Q_ASSERT.

Referenced by macDateToString().

+ Here is the caller graph for this function:

◆ zeroPad()

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

Definition at line 181 of file qlocale_mac.mm.

References digits(), insert(), 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: