Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qlocale_p.h File Reference

(cabdea9665772f9f4148f4ce60fb128db2737c6e)

#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::GroupSizes
 
struct  QLocaleData::NumericData
 
struct  QLocaleData::DataRange
 
class  QLocalePrivate
 

Namespaces

namespace  QtPrivate
 

Macros

#define ForEachQLocaleRange(X)
 
#define rangeGetter(name)
 
#define rangeIndex(name)
 
#define Size(name)
 

Typedefs

using CharBuff = QVarLengthArray<char, 256>
 

Functions

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

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 471 of file qlocale_p.h.

◆ rangeGetter

#define rangeGetter ( name)
Value:
[[nodiscard]] DataRange name() const { return { m_ ## name ## _idx, m_ ## name ## _size }; }
EGLImageKHR EGLint * name

Definition at line 485 of file qlocale_p.h.

◆ rangeIndex

#define rangeIndex ( name)
Value:
quint16 m_ ## name ## _idx;
unsigned short quint16
Definition qtypes.h:53

Definition at line 494 of file qlocale_p.h.

◆ Size

#define Size ( name)
Value:
quint8 m_ ## name ## _size;
unsigned char quint8
Definition qtypes.h:51

Typedef Documentation

◆ CharBuff

using CharBuff = QVarLengthArray<char, 256>

Definition at line 228 of file qlocale_p.h.

Function Documentation

◆ ascii_isspace()

bool ascii_isspace ( uchar c)
inlinenodiscardconstexprnoexcept

Definition at line 587 of file qlocale_p.h.

References QtPrivate::ascii_space_chars.

◆ Q_DECLARE_TYPEINFO() [1/4]

Q_DECLARE_TYPEINFO ( QLocaleData::GroupSizes ,
Q_PRIMITIVE_TYPE  )

◆ Q_DECLARE_TYPEINFO() [2/4]

Q_DECLARE_TYPEINFO ( QLocaleId ,
Q_PRIMITIVE_TYPE  )

◆ Q_DECLARE_TYPEINFO() [3/4]

◆ Q_DECLARE_TYPEINFO() [4/4]

Q_DECLARE_TYPEINFO ( QSystemLocale::QueryType ,
Q_PRIMITIVE_TYPE  )

◆ qt_readEscapedFormatString()

QString qt_readEscapedFormatString ( QStringView format,
qsizetype * idx )

Definition at line 712 of file qlocale.cpp.

◆ qt_repeatCount()

qsizetype qt_repeatCount ( QStringView s)
nodiscardnoexcept

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) noexcept
Definition qlocale.cpp:762

Definition at line 762 of file qlocale.cpp.

◆ qt_splitLocaleName()

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

Definition at line 649 of file qlocale.cpp.

References Qt::CaseSensitive.