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>.
|
#include "qglobal.h"
#include "qplatformdefs.h"
#include "qdatastream.h"
#include "qdebug.h"
#include "qhashfunctions.h"
#include "qstring.h"
#include "qlocale.h"
#include "qlocale_p.h"
#include "qlocale_tools_p.h"
#include <private/qtools_p.h>
#include "qnamespace.h"
#include "qdatetime.h"
#include "qstringlist.h"
#include "qvariant.h"
#include "qvarlengtharray.h"
#include "qstringbuilder.h"
#include "private/qnumeric_p.h"
#include <cmath>
#include "qmutex.h"
#include "private/qcalendarbackend_p.h"
#include "private/qgregoriancalendar_p.h"
#include "qcalendar.h"
#include <q20iterator.h>
#include "qlocale_data_p.h"
#include "moc_qlocale.cpp"
Go to the source code of this file.
Macros | |
#define | CheckCandidate(id) |
Variables | |
static Q_CONSTINIT QSystemLocale * | _systemLocale = nullptr |
static Q_CONSTINIT QLocaleData | systemLocaleData = {} |
static Q_CONSTINIT const QLocaleData * | default_data = nullptr |
static constexpr qsizetype | locale_data_size = q20::ssize(locale_data) - 1 |
#define CheckCandidate | ( | id | ) |
|
static |
Definition at line 1386 of file qlocale.cpp.
References method, qWarning, and sep.
Referenced by QLocale::bcp47Name(), QLocale::name(), and QLocale::uiLanguages().
|
static |
Definition at line 689 of file qlocale.cpp.
References locale_data, and QLocale::OmitGroupSeparator.
Referenced by findLocalePrivate(), QLocale::matchingLocales(), and Q_GLOBAL_STATIC().
|
static |
Definition at line 4498 of file qlocale.cpp.
References ascii_isspace().
Referenced by QLocaleData::bytearrayToLongLong(), and QLocaleData::bytearrayToUnsLongLong().
|
static |
Definition at line 833 of file qlocale.cpp.
References default_data, and systemData().
Referenced by defaultIndex(), and findLocalePrivate().
|
static |
Definition at line 840 of file qlocale.cpp.
References defaultData(), QLocaleData::findLocaleIndex(), locale_data, Q_ASSERT, QtPrivate::q_points_into_range(), and systemLocaleData.
Referenced by QMimeType::comment(), findLocalePrivate(), and language::lookupEnum().
Definition at line 468 of file qlocale.cpp.
References locale_data, locale_index, and Q_ASSERT.
Referenced by QLocaleData::findLocaleIndex().
|
static |
Definition at line 894 of file qlocale.cpp.
References QLocale::C, c_private(), defaultData(), defaultIndex(), QLocale::DefaultNumberOptions, QLocaleData::findLocaleIndex(), locale_data, locale_data_size, and Q_ASSERT.
|
staticnoexcept |
Definition at line 537 of file qlocale.cpp.
References i.
Referenced by qt_splitLocaleName().
|
static |
Definition at line 557 of file qlocale.cpp.
References QString::fromLatin1(), script_code_list, and tag.
Referenced by qt_splitLocaleName(), and QmlIR::IRBuilder::visit().
|
static |
Definition at line 935 of file qlocale.cpp.
References opt, single_character_data, and systemLocaleString().
Referenced by QLocaleData::decimalPoint(), QLocaleData::groupSeparator(), QLocaleData::negativeSign(), QLocaleData::positiveSign(), and QLocaleData::zeroDigit().
QDataStream & operator<< | ( | QDataStream & | ds, |
const QLocale & | l ) |
Definition at line 863 of file qlocale.cpp.
References QLocale::name().
Definition at line 4936 of file qlocale.cpp.
References QLocale::language(), QLocale::languageToString(), QLocale::script(), QLocale::scriptToString(), QLocale::territory(), and QLocale::territoryToString().
QDataStream & operator>> | ( | QDataStream & | ds, |
QLocale & | l ) |
Definition at line 869 of file qlocale.cpp.
Q_GLOBAL_STATIC | ( | QSharedDataPointer< QLocalePrivate > | , |
defaultLocalePrivate | , | ||
new | QLocalePrivatedefaultData(), defaultIndex() ) |
Definition at line 880 of file qlocale.cpp.
References QLocale::C, c_private(), QLocale::DefaultNumberOptions, QLocaleData::findLocaleIndex(), QLocaleId::fromName(), locale_data, locale_data_size, QLocale::OmitGroupSeparator, and Q_ASSERT.
QString qt_readEscapedFormatString | ( | QStringView | format, |
qsizetype * | idx ) |
Definition at line 625 of file qlocale.cpp.
Referenced by QCalendarBackend::dateTimeToString(), macToQtFormat(), and timeFormatContainsAP().
qsizetype qt_repeatCount | ( | QStringView | s | ) |
Counts the number of identical leading characters in s.
If s is empty, returns 0.
Otherwise, returns the number of consecutive {s.front()} characters at the start of s.
Definition at line 675 of file qlocale.cpp.
References j.
Referenced by countRepeat(), QCalendarBackend::dateTimeToString(), and macToQtFormat().
bool qt_splitLocaleName | ( | QStringView | name, |
QStringView * | lang, | ||
QStringView * | script, | ||
QStringView * | land ) |
Definition at line 567 of file qlocale.cpp.
References findTag(), isScript(), Q_FALLTHROUGH, sep, state, tag, and validTag().
Referenced by QLocaleId::fromName(), and scanLangEnv().
|
static |
Definition at line 3033 of file qlocale.cpp.
References QLocale::LongFormat, QLocale::NarrowFormat, and QLocale::ShortFormat.
Referenced by QCalendarBackend::monthName(), and rawStandaloneMonthName().
|
static |
Definition at line 3058 of file qlocale.cpp.
References QString::isEmpty(), QLocale::LongFormat, QLocale::NarrowFormat, rawMonthName(), and QLocale::ShortFormat.
Referenced by QCalendarBackend::standaloneMonthName().
|
static |
Definition at line 3108 of file qlocale.cpp.
References days_data, QLocale::LongFormat, QLocale::NarrowFormat, rawWeekDayName(), and QLocale::ShortFormat.
Referenced by QCalendarBackend::standaloneWeekDayName().
|
static |
Definition at line 3084 of file qlocale.cpp.
References days_data, QLocale::LongFormat, QLocale::NarrowFormat, and QLocale::ShortFormat.
Referenced by rawStandaloneWeekDayName(), and QCalendarBackend::weekDayName().
|
static |
Definition at line 3022 of file qlocale.cpp.
References calendar.
Referenced by QCalendarBackend::monthName(), and QCalendarBackend::standaloneMonthName().
|
static |
Definition at line 793 of file qlocale.cpp.
References QLocaleData::findLocaleIndex(), locale_data, QMutex::lock(), Q_UNUSED, systemLocaleData, and updateSystemPrivate().
Referenced by QLocale::QLocale(), defaultData(), QLocale::matchingLocales(), and QLocale::system().
|
static |
Definition at line 746 of file qlocale.cpp.
References _systemLocale.
Referenced by addFontToDatabase(), QLocale::amText(), QLocale::collation(), QLocale::createSeparatedList(), QLocale::currencySymbol(), QLocale::dateFormat(), QLocale::dateTimeFormat(), QLocale::firstDayOfWeek(), makeAcceptLanguage(), QLocale::measurementSystem(), QRomanCalendar::monthName(), QLocale::nativeLanguageName(), QLocale::nativeTerritoryName(), QLocaleData::numericData(), QLocale::pmText(), QLocale::quoteString(), QRomanCalendar::standaloneMonthName(), QCalendarBackend::standaloneWeekDayName(), systemLocaleString(), QLocale::timeFormat(), QLocale::toCurrencyString(), QLocale::toCurrencyString(), QLocale::toCurrencyString(), QLocale::toString(), QLocale::toString(), QLocale::toString(), QLocale::toString(), QLocale::toString(), QLocale::uiLanguages(), updateSystemPrivate(), QCalendarBackend::weekDayName(), QLocale::weekdays(), and QLocaleData::zeroUcs().
|
static |
Definition at line 917 of file qlocale.cpp.
References Q_UNUSED, systemLocale(), and systemLocaleData.
Referenced by localeString().
|
static |
Definition at line 2188 of file qlocale.cpp.
References i, and qt_readEscapedFormatString().
Referenced by QCalendarBackend::dateTimeToString().
|
inlinestatic |
|
static |
Definition at line 758 of file qlocale.cpp.
References QLocale::AnyScript, default_data, QSystemLocale::LanguageId, locale_data, QSystemLocale::LocaleChanged, QLocalePrivate::s_generation, QSystemLocale::ScriptId, systemLocale(), systemLocaleData, and QSystemLocale::TerritoryId.
Referenced by systemData().
|
static |
Definition at line 546 of file qlocale.cpp.
References ch, QtMiscUtils::isAsciiLetterOrNumber(), and tag.
Referenced by qt_splitLocaleName().
|
static |
Definition at line 69 of file qlocale.cpp.
Referenced by QSystemLocale::QSystemLocale(), QSystemLocale::~QSystemLocale(), and systemLocale().
|
static |
Definition at line 686 of file qlocale.cpp.
Referenced by defaultData(), QLocale::setDefault(), and updateSystemPrivate().
|
staticconstexpr |
Definition at line 878 of file qlocale.cpp.
Referenced by findLocalePrivate(), QLocale::matchingLocales(), Q_GLOBAL_STATIC(), and QLocale::system().
|
static |
Definition at line 70 of file qlocale.cpp.
Referenced by QSystemLocale::QSystemLocale(), QSystemLocale::~QSystemLocale(), QLocale::amText(), QLocale::collation(), QLocale::createSeparatedList(), QLocale::currencySymbol(), QLocale::dateFormat(), QLocale::dateTimeFormat(), defaultIndex(), QLocale::firstDayOfWeek(), QLocale::measurementSystem(), QRomanCalendar::monthName(), QLocale::nativeLanguageName(), QLocale::nativeTerritoryName(), QLocaleData::numericData(), QLocale::pmText(), QLocale::quoteString(), QRomanCalendar::standaloneMonthName(), QCalendarBackend::standaloneWeekDayName(), QLocale::system(), systemData(), systemLocaleString(), QLocale::timeFormat(), QLocale::toCurrencyString(), QLocale::toCurrencyString(), QLocale::toCurrencyString(), QLocale::toString(), QLocale::toString(), QLocale::toString(), QLocale::toString(), QLocale::toString(), QLocale::uiLanguages(), updateSystemPrivate(), QCalendarBackend::weekDayName(), QLocale::weekdays(), and QLocaleData::zeroUcs().