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

(50d8d6cfa0f3370f0af4d8d5fc168d3dfe12e83e)

#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/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

Definition at line 27 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:6061

Definition at line 21 of file qqmllocale.cpp.

Function Documentation

◆ isLocaleObject()

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

Definition at line 35 of file qqmllocale.cpp.

◆ qtDayToQmlDay()

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

Definition at line 502 of file qqmllocale.cpp.