![]() |
Qt 6.x
The Qt SDK
|
#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 686 of file qlocale.cpp.
References locale_data, and QLocale::OmitGroupSeparator.
Referenced by findLocalePrivate(), QLocale::matchingLocales(), and Q_GLOBAL_STATIC().
|
static |
Definition at line 4334 of file qlocale.cpp.
References ascii_isspace().
Referenced by QLocaleData::bytearrayToLongLong(), and QLocaleData::bytearrayToUnsLongLong().
|
static |
Definition at line 809 of file qlocale.cpp.
References default_data, and systemData().
Referenced by defaultIndex(), and findLocalePrivate().
|
static |
Definition at line 816 of file qlocale.cpp.
References defaultData(), QLocaleData::findLocaleIndex(), locale_data, Q_ASSERT, QtPrivate::q_points_into_range(), and systemLocaleData.
Referenced by findLocalePrivate(), language::lookupEnum(), and QLocale::system().
Definition at line 466 of file qlocale.cpp.
References QLocaleId::acceptLanguage(), QLocaleId::acceptScriptTerritory(), QLocaleData::id(), QLocaleId::language_id, locale_data, locale_index, and Q_ASSERT.
Referenced by QLocaleData::findLocaleIndex().
|
static |
Definition at line 871 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 535 of file qlocale.cpp.
References i.
Referenced by qt_splitLocaleName().
|
static |
Definition at line 555 of file qlocale.cpp.
References QString::fromLatin1(), QString::indexOf(), script_code_list, and tag.
Referenced by qt_splitLocaleName(), and QmlIR::IRBuilder::visit().
|
static |
Definition at line 912 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 839 of file qlocale.cpp.
References QLocale::name().
Definition at line 4758 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 845 of file qlocale.cpp.
Q_GLOBAL_STATIC | ( | QSharedDataPointer< QLocalePrivate > | , |
defaultLocalePrivate | , | ||
new | QLocalePrivatedefaultData(), defaultIndex() | ||
) |
Definition at line 857 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 623 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 673 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 565 of file qlocale.cpp.
References findTag(), isScript(), Q_FALLTHROUGH, sep, state, tag, and validTag().
Referenced by QLocaleId::fromName(), and getWinLocaleName().
|
static |
Definition at line 2895 of file qlocale.cpp.
References QLocale::LongFormat, QLocale::NarrowFormat, and QLocale::ShortFormat.
Referenced by QCalendarBackend::monthName(), and rawStandaloneMonthName().
|
static |
Definition at line 2920 of file qlocale.cpp.
References QString::isEmpty(), QLocale::LongFormat, QLocale::NarrowFormat, rawMonthName(), and QLocale::ShortFormat.
Referenced by QCalendarBackend::standaloneMonthName().
|
static |
Definition at line 2970 of file qlocale.cpp.
References days_data, QLocale::LongFormat, QLocale::NarrowFormat, rawWeekDayName(), and QLocale::ShortFormat.
Referenced by QCalendarBackend::standaloneWeekDayName().
|
static |
Definition at line 2946 of file qlocale.cpp.
References days_data, QLocale::LongFormat, QLocale::NarrowFormat, and QLocale::ShortFormat.
Referenced by rawStandaloneWeekDayName(), and QCalendarBackend::weekDayName().
|
static |
Definition at line 786 of file qlocale.cpp.
References locale_data, QMutex::lock(), systemLocaleData, and updateSystemPrivate().
Referenced by QLocale::QLocale(), defaultData(), QLocale::matchingLocales(), and QLocale::system().
|
static |
Definition at line 743 of file qlocale.cpp.
References _systemLocale.
Referenced by addFontToDatabase(), QLocale::amText(), QLocale::collation(), QLocale::createSeparatedList(), QLocale::currencySymbol(), QLocale::dateFormat(), QLocale::dateTimeFormat(), QLocale::firstDayOfWeek(), QLocale::measurementSystem(), QGregorianCalendar::monthName(), QLocale::nativeLanguageName(), QLocale::nativeTerritoryName(), QLocaleData::numericData(), QLocale::pmText(), QHttpNetworkConnectionPrivate::prepareRequest(), QLocale::quoteString(), QGregorianCalendar::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 894 of file qlocale.cpp.
References Q_UNUSED, QSystemLocale::query(), systemLocale(), systemLocaleData, and QVariant::toString().
Referenced by localeString().
|
static |
Definition at line 2098 of file qlocale.cpp.
References i, and qt_readEscapedFormatString().
Referenced by QCalendarBackend::dateTimeToString().
|
inlinestatic |
|
static |
Definition at line 755 of file qlocale.cpp.
References QLocale::AnyScript, QSystemLocale::fallbackLocaleIndex(), QSystemLocale::LanguageId, locale_data, QSystemLocale::LocaleChanged, QSystemLocale::query(), QSystemLocale::ScriptId, systemLocale(), systemLocaleData, and QSystemLocale::TerritoryId.
Referenced by systemData().
|
static |
Definition at line 544 of file qlocale.cpp.
References ch, QtMiscUtils::isAsciiLetterOrNumber(), and tag.
Referenced by qt_splitLocaleName().
|
static |
Definition at line 67 of file qlocale.cpp.
Referenced by QSystemLocale::QSystemLocale(), QSystemLocale::~QSystemLocale(), and systemLocale().
|
static |
Definition at line 684 of file qlocale.cpp.
Referenced by defaultData(), and QLocale::setDefault().
|
staticconstexpr |
Definition at line 854 of file qlocale.cpp.
Referenced by findLocalePrivate(), QLocale::matchingLocales(), and Q_GLOBAL_STATIC().
|
static |
Definition at line 68 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(), QGregorianCalendar::monthName(), QLocale::nativeLanguageName(), QLocale::nativeTerritoryName(), QLocaleData::numericData(), QLocale::pmText(), QLocale::quoteString(), QGregorianCalendar::standaloneMonthName(), QCalendarBackend::standaloneWeekDayName(), 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().