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_p.h File Reference

(b68f1009187fee473f4c6477ec64300650e29904)

#include "qlocale.h"
#include <QtCore/qcalendar.h>
#include <QtCore/qlist.h>
#include <QtCore/qnumeric.h>
#include <QtCore/private/qnumeric_p.h>
#include <QtCore/qstring.h>
#include <QtCore/qvariant.h>
#include <QtCore/qvarlengtharray.h>
#include <limits>
#include <cmath>
#include <string_view>
+ Include dependency graph for qlocale_p.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  QSimpleParsedNumber< T >
 
struct  QCharacterSetMatch< MaskType, Lowest >
 
class  QSystemLocale
 
struct  QSystemLocale::CurrencyToStringArgument
 
struct  QLocaleId
 
struct  ParsingResult
 
struct  QLocaleData
 
struct  QLocaleData::NumericData
 
struct  QLocaleData::DataRange
 
class  QLocalePrivate
 

Namespaces

namespace  QtPrivate
 \macro QT_NO_KEYWORDS >
 

Macros

#define ForEachQLocaleRange(X)
 
#define rangeGetter(name)    [[nodiscard]] DataRange name() const { return { m_ ## name ## _idx, m_ ## name ## _size }; }
 
#define rangeIndex(name)   quint16 m_ ## name ## _idx;
 
#define Size(name)   quint8 m_ ## name ## _size;
 

Typedefs

using CharBuff = QVarLengthArray<char, 256>
 

Functions

template<const char * Set, int ForcedLowest = -1>
constexpr auto QtPrivate::makeCharacterSetMatch ()
 
 Q_DECLARE_TYPEINFO (QSystemLocale::QueryType, Q_PRIMITIVE_TYPE)
 
 Q_DECLARE_TYPEINFO (QSystemLocale::CurrencyToStringArgument, Q_RELOCATABLE_TYPE)
 
 Q_DECLARE_TYPEINFO (QLocaleId, Q_PRIMITIVE_TYPE)
 
QString qt_readEscapedFormatString (QStringView format, qsizetype *idx)
 
bool qt_splitLocaleName (QStringView name, QStringView *lang=nullptr, QStringView *script=nullptr, QStringView *cntry=nullptr)
 
qsizetype qt_repeatCount (QStringView s)
 
constexpr bool ascii_isspace (uchar c)
 

Variables

constexpr char QtPrivate::ascii_space_chars []
 

Macro Definition Documentation

◆ ForEachQLocaleRange

#define ForEachQLocaleRange ( X)
Value:
X(startListPattern) X(midListPattern) X(endListPattern) X(pairListPattern) X(listDelimit) \
X(decimalSeparator) X(groupDelim) X(percent) X(zero) X(minus) X(plus) X(exponential) \
X(quoteStart) X(quoteEnd) X(quoteStartAlternate) X(quoteEndAlternate) \
X(longDateFormat) X(shortDateFormat) X(longTimeFormat) X(shortTimeFormat) \
X(longDayNamesStandalone) X(longDayNames) \
X(shortDayNamesStandalone) X(shortDayNames) \
X(narrowDayNamesStandalone) X(narrowDayNames) \
X(anteMeridiem) X(postMeridiem) \
X(byteCount) X(byteAmountSI) X(byteAmountIEC) \
X(currencySymbol) X(currencyDisplayName) \
X(currencyFormat) X(currencyFormatNegative) \
X(endonymLanguage) X(endonymTerritory)
#define X(name)
#define zero

Definition at line 446 of file qlocale_p.h.

◆ rangeGetter

#define rangeGetter ( name)     [[nodiscard]] DataRange name() const { return { m_ ## name ## _idx, m_ ## name ## _size }; }

Definition at line 460 of file qlocale_p.h.

◆ rangeIndex

#define rangeIndex ( name)    quint16 m_ ## name ## _idx;

Definition at line 469 of file qlocale_p.h.

◆ Size

#define Size ( name)    quint8 m_ ## name ## _size;

Typedef Documentation

◆ CharBuff

using CharBuff = QVarLengthArray<char, 256>

Definition at line 228 of file qlocale_p.h.

Function Documentation

◆ ascii_isspace()

constexpr bool ascii_isspace ( uchar c)
inlineconstexpr

Definition at line 556 of file qlocale_p.h.

References matcher.

Referenced by checkParsed(), QStringAlgorithms< StringType >::isSpace(), qstrntoll(), qstrntoull(), read_pbm_header(), and read_pbm_int().

+ Here is the caller graph for this function:

◆ Q_DECLARE_TYPEINFO() [1/3]

Q_DECLARE_TYPEINFO ( QLocaleId ,
Q_PRIMITIVE_TYPE  )

◆ Q_DECLARE_TYPEINFO() [2/3]

◆ Q_DECLARE_TYPEINFO() [3/3]

Q_DECLARE_TYPEINFO ( QSystemLocale::QueryType ,
Q_PRIMITIVE_TYPE  )

◆ qt_readEscapedFormatString()

QString qt_readEscapedFormatString ( QStringView format,
qsizetype * idx )

Definition at line 625 of file qlocale.cpp.

References i, and Q_ASSERT.

Referenced by QCalendarBackend::dateTimeToString(), macToQtFormat(), and timeFormatContainsAP().

+ Here is the caller graph for this function:

◆ qt_repeatCount()

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.

qt_repeatCount(u"a"); // == 1
qt_repeatCount(u"ab"); // == 1
qt_repeatCount(u"aab"); // == 2
qsizetype qt_repeatCount(QStringView s)
Definition qlocale.cpp:675

Definition at line 675 of file qlocale.cpp.

References j.

Referenced by countRepeat(), QCalendarBackend::dateTimeToString(), and macToQtFormat().

+ Here is the caller graph for this function:

◆ qt_splitLocaleName()

bool qt_splitLocaleName ( QStringView name,
QStringView * lang = nullptr,
QStringView * script = nullptr,
QStringView * cntry = nullptr )

Definition at line 567 of file qlocale.cpp.

References findTag(), isScript(), Q_FALLTHROUGH, sep, state, tag, and validTag().

Referenced by QLocaleId::fromName(), and scanLangEnv().

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