#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 "moc_qqmllocale_p.cpp"
Go to the source code of this file.
◆ GET_LOCALE_DATA_RESOURCE
#define GET_LOCALE_DATA_RESOURCE |
( |
|
OBJECT | ) |
|
Value:
THROW_ERROR("Not a valid Locale object")
Definition at line 29 of file qqmllocale.cpp.
◆ LOCALE_FORMAT
#define LOCALE_FORMAT |
( |
|
FUNC | ) |
|
Value:
const QLocale *locale = getThisLocale(scope, thisObject); \
if (!locale) \
if (argc > 1) \
THROW_ERROR("Locale: " #FUNC "(): Invalid arguments"); \
if (argc == 1) { \
} \
RETURN_RESULT(scope.engine->newString(locale-> FUNC (
format))); \
}
GLboolean GLboolean GLboolean b
GLint GLsizei GLsizei GLenum format
static constexpr ReturnedValue undefined()
unsigned int toUInt32() const
Definition at line 576 of file qqmllocale.cpp.
◆ LOCALE_FORMATTED_DAYNAME
#define LOCALE_FORMATTED_DAYNAME |
( |
|
VARIABLE | ) |
|
Value:
const QLocale *locale = getThisLocale(scope, thisObject); \
if (!locale) \
if (argc < 1 || argc > 2) \
THROW_ERROR("Locale: " #VARIABLE "(): Invalid arguments"); \
if (idx < 0 || idx > 7) \
THROW_ERROR("Locale: Invalid day"); \
if (idx == 0) idx = 7; \
} else { \
THROW_ERROR("Locale: Invalid datetime format"); \
} \
} else { \
} \
RETURN_RESULT(scope.engine->newString(
name)); \
}
\macro QT_RESTRICTED_CAST_FROM_ASCII
Q_QML_PRIVATE_EXPORT QV4::ReturnedValue locale(QV4::ExecutionEngine *engine, const QString &localeName)
Provides locale specific properties and formatted data.
static bool isNumber(char s)
if(qFloatDistance(a, b)<(1<< 7))
[0]
Definition at line 625 of file qqmllocale.cpp.
◆ LOCALE_FORMATTED_MONTHNAME
#define LOCALE_FORMATTED_MONTHNAME |
( |
|
VARIABLE | ) |
|
Value:
const QLocale *locale = getThisLocale(scope, thisObject); \
if (!locale) \
if (argc < 1 || argc > 2) \
THROW_ERROR("Locale: " #VARIABLE "(): Invalid arguments"); \
if (idx < 1 || idx > 12) \
THROW_ERROR("Locale: Invalid month"); \
if (argc == 2) { \
} else { \
THROW_ERROR("Locale: Invalid datetime format"); \
} \
} else { \
} \
RETURN_RESULT(scope.engine->newString(
name)); \
}
Definition at line 597 of file qqmllocale.cpp.
◆ LOCALE_STRING_PROPERTY
#define LOCALE_STRING_PROPERTY |
( |
|
VARIABLE | ) |
|
Value:
{ \
const QLocale *locale = getThisLocale(scope, thisObject); \
if (!locale) \
RETURN_RESULT(scope.engine->newString(locale-> VARIABLE()));\
}
Definition at line 732 of file qqmllocale.cpp.
◆ THROW_ERROR
Value: do { \
} while (false)
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition at line 23 of file qqmllocale.cpp.
◆ DEFINE_OBJECT_VTABLE()
◆ isLocaleObject()
static bool isLocaleObject |
( |
const QV4::Value & |
val | ) |
|
|
static |
◆ V4_DEFINE_EXTENSION()