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
qqmllocale.cpp File Reference

(99c7fe45be00b694da4041c5a06e5484f2985dc6)

#include "qqmllocale_p.h"
#include <private/qqmlcontext_p.h>
#include <QtCore/qnumeric.h>
#include <QtCore/qdatetime.h>
#include <QtCore/qtimezone.h>
#include <private/qlocale_p.h>
#include <private/qlocale_data_p.h>
#include <private/qv4dateobject_p.h>
#include <private/qv4numberobject_p.h>
#include <private/qv4stringobject_p.h>
#include <private/qqmlvaluetypewrapper_p.h>
#include "moc_qqmllocale_p.cpp"
+ Include dependency graph for qqmllocale.cpp:

Go to the source code of this file.

Macros

#define THROW_ERROR(string)
 
#define GET_LOCALE_DATA_RESOURCE(OBJECT)
 

Functions

static bool isLocaleObject (const QV4::Value &val)
 
static QQmlLocale::DayOfWeek qtDayToQmlDay (Qt::DayOfWeek day)
 

Macro Definition Documentation

◆ GET_LOCALE_DATA_RESOURCE

#define GET_LOCALE_DATA_RESOURCE ( OBJECT)
Value:
QLocale *r = [&]() { \
return r ? r->cast<QLocale>() : nullptr; \
}(); \
if (!r) \
THROW_ERROR("Not a valid Locale object")
GLboolean r
[2]
QObject::connect nullptr

Definition at line 28 of file qqmllocale.cpp.

◆ THROW_ERROR

#define THROW_ERROR ( string)
Value:
do { \
return scope.engine->throwError(QString::fromUtf8(string)); \
} while (false)
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qstring.cpp:6018

Definition at line 22 of file qqmllocale.cpp.

Function Documentation

◆ isLocaleObject()

static bool isLocaleObject ( const QV4::Value & val)
static

Definition at line 36 of file qqmllocale.cpp.

References QV4::Value::as(), and wrapper().

+ Here is the call graph for this function:

◆ qtDayToQmlDay()

static QQmlLocale::DayOfWeek qtDayToQmlDay ( Qt::DayOfWeek day)
static

Definition at line 503 of file qqmllocale.cpp.

References Qt::Sunday, and QQmlLocale::Sunday.

Referenced by QQmlLocaleValueType::firstDayOfWeek(), and QQmlLocaleValueType::weekDays().

+ Here is the caller graph for this function: