6#include <private/qqmlcomponent_p.h>
7#include <private/qqmldebugconnector_p.h>
8#include <private/qqmldebugserviceinterfaces_p.h>
9#include <private/qqmldelayedcallqueue_p.h>
10#include <private/qqmlengine_p.h>
11#include <private/qqmlloggingcategorybase_p.h>
12#include <private/qqmlplatform_p.h>
13#include <private/qqmlstringconverters_p.h>
15#include <private/qv4dateobject_p.h>
16#include <private/qv4engine_p.h>
17#include <private/qv4functionobject_p.h>
18#include <private/qv4include_p.h>
19#include <private/qv4mm_p.h>
20#include <private/qv4qobjectwrapper_p.h>
21#include <private/qv4stackframe_p.h>
23#include <QtQml/qqmlfile.h>
25#include <QtCore/qcoreapplication.h>
26#include <QtCore/qcryptographichash.h>
27#include <QtCore/qdatetime.h>
28#include <QtCore/qfileinfo.h>
29#include <QtCore/qloggingcategory.h>
30#include <QtCore/qpoint.h>
31#include <QtCore/qrect.h>
32#include <QtCore/qsize.h>
33#include <QtCore/qstring.h>
34#include <QtCore/qurl.h>
44#define THROW_TYPE_ERROR_WITH_MESSAGE(msg) \
46 return scope.engine->throwTypeError(QString::fromUtf8(msg)); \
269QtObject::Contexts QtObject::getContexts()
const
280 QQmlRefPointer<QQmlContextData> effectiveContext
282 return {
context, effectiveContext};
309 return qjsvalue_cast<QObject *>(
value) !=
nullptr;
400 if (color1.userType() == QMetaType::QString) {
406 }
else if (color1.userType() != QMetaType::QColor) {
412 if (color2.userType() == QMetaType::QString) {
418 }
else if (color2.userType() != QMetaType::QColor) {
423 return color1 == color2;
467 if (!fontSpecifier.isObject()) {
474 fontSpecifier,
QMetaType(QMetaType::QFont));
480 "no valid font subproperties specified"));
496template<
typename T,
typename ...Others>
499 addParameters<T>(e,
result,
i, parameter);
503template<
typename ...T>
561 const QMetaType metaType(QMetaType::QMatrix4x4);
583 if (
value.isObject()) {
591 "not a valid matrix4x4 values array"));
610 double m21,
double m22,
double m23,
double m24,
611 double m31,
double m32,
double m33,
double m34,
612 double m41,
double m42,
double m43,
double m44)
const
615 m11, m12, m13, m14, m21, m22, m23, m24,
616 m31, m32, m33, m34, m41, m42, m43, m44);
622 if (
color.isString()) {
628 if (
v.userType() != QMetaType::QColor) {
746 return formatThis.toString(
format);
789 <<
string <<
"is a date/time string being passed to formatDate()."
790 <<
"You should only pass date strings to formatDate().";
813 return formatDateTimeObjectUsingDateFormat(
date,
format);
842#if QT_CONFIG(qml_locale)
859 return locale.
toString(qDate.value(), formatType);
894 <<
string <<
"is a date/time string being passed to formatTime()."
895 <<
"You should only pass time strings to formatTime().";
932 return formatDateTimeObjectUsingDateFormat(
time,
format);
948#if QT_CONFIG(qml_locale)
965 return locale.
toString(qTime.value(), formatType);
1085 return std::nullopt;
1116#if QT_CONFIG(qml_locale)
1178 if (QQmlRefPointer<QQmlContextData> ctxt = v4Engine()->callingQmlContext())
1179 return ctxt->resolvedUrl(
url);
1200 return data->outerContext->resolvedUrl(
url);
1314 "Can only be called on a QML engine."));
1323 errorstr +=
QLatin1String(
"Qt.createQmlObject(): failed to create object: ");
1329 for (
int ii = 0; ii < errors.size(); ++ii) {
1337 qmlerrors->put(ii, qmlerror);
1343 return errorObject.asReturnedValue();
1353 if (context->isPragmaLibraryContext())
1354 effectiveContext =
engine->rootContext();
1356 effectiveContext = context->asQQmlContext();
1373 Q_ASSERT(typeData->isCompleteOrError());
1376 componentPrivate->fromTypeData(typeData);
1377 componentPrivate->progress = 1.0;
1379 Scope scope(v4Engine());
1391 if (!effectiveContext->
isValid()) {
1393 "in an invalid context"));
1405 for (
int ii = 0; ii < functions.size(); ++ii) {
1513 auto [context, effectiveContext] = getContexts();
1544 auto [context, effectiveContext] = getContexts();
1551 QStringLiteral(
"Invalid arguments; did you swap mode and parent"));
1559#if QT_CONFIG(translation)
1560QString QtObject::uiLanguage()
const
1563 return e->uiLanguage();
1567void QtObject::setUiLanguage(
const QString &uiLanguage)
1570 e->setUiLanguage(uiLanguage);
1573QBindable<QString> QtObject::uiLanguageBindable()
1577 return QBindable<QString>();
1581#if QT_CONFIG(qml_locale)
1602QLocale QtObject::locale()
const
1617 JavaScriptFunctionObject::init(context, bindingFunction->
function());
1618 this->bindingFunction.
set(internalClass->engine, bindingFunction->d());
1625 return f->engine()->throwTypeError(
QStringLiteral(
"Bindings must not be called directly."));
1631 if (
frame->v4Function)
1683 = QJSValuePrivate::asManagedType<JavaScriptFunctionObject>(&function);
1689 "binding(): argument (binding expression) must be a function")));
1698 m_engine->delayedCallQueue()->addUniquelyAndExecuteLater(m_engine,
args);
1715 return m_application;
1768 const int line =
f->lineNumber();
1769 if (
line !=
f->missingLineNumber()) {
1774 f->function(),
f->source());
1780 stack += stackFrame;
1790 alreadySeen.insert(
array->d());
1797 if (
val->isManaged() &&
val->managed()->isArrayLike())
1798 if (!alreadySeen.contains(
val->objectValue()->d()))
1806 alreadySeen.remove(
array->d());
1822 = qobject_cast<QQmlLoggingCategoryBase *>(
wrapper->object())) {
1824 loggingCategory =
category->category();
1833 for (
int i =
start, ei = argc;
i < ei; ++
i) {
1837 QSet<QV4::Heap::Object *> alreadySeenElements;
1838 if (argv[
i].isManaged() && argv[
i].
managed()->isArrayLike())
1841 result.append(argv[
i].toQStringNoThrow());
1847 if (!loggingCategory)
1848 loggingCategory = v4->
qmlEngine() ? &lcQml() : &lcJs();
1853 baFunction.constData(), loggingCategory->categoryName());
1857 if (loggingCategory->isDebugEnabled())
1861 if (loggingCategory->isInfoEnabled())
1862 logger.info(
"%s",
result.toUtf8().constData());
1865 if (loggingCategory->isWarningEnabled())
1866 logger.warning(
"%s",
result.toUtf8().constData());
1869 if (loggingCategory->isCriticalEnabled())
1870 logger.critical(
"%s",
result.toUtf8().constData());
1910 logger.
warning(
"Cannot start profiling because debug service is disabled. Start with -qmljsdebugger=port:XXXXX.");
1912 service->startProfiling(v4->
jsEngine());
1913 logger.
debug(
"Profiling started.");
1931 logger.
warning(
"Ignoring console.profileEnd(): the debug service is disabled.");
1933 service->stopProfiling(v4->
jsEngine());
1934 logger.
debug(
"Profiling ended.");
2002 frame->function().toUtf8().constData())
2023 for (
int i = 1, ei = argc;
i < ei; ++
i) {
2034 frame->function().toUtf8().constData())
2056 #if QT_CONFIG(translation)
2089#if QT_CONFIG(translation)
2112 if (!argv[0].isString())
2114 if (!argv[1].isString())
2116 if ((argc > 2) && !argv[2].isString())
2125 if (argc >
i && argv[
i].isString()) {
2126 qWarning(
"qsTranslate(): specifying the encoding as fourth argument is deprecated");
2135 if (ep->propertyCapture)
2136 ep->propertyCapture->captureTranslation();
2185 auto translationContextIndex = unit->unitData()->translationContextIndex();
2186 if (translationContextIndex)
2187 context = unit->stringAt(*translationContextIndex);
2205 if (QQmlRefPointer<QQmlContextData> ctxt =
engine->callingQmlContext()) {
2209 int length = lastDot - (lastSlash + 1);
2239 if (!argv[0].isString())
2241 if ((argc > 1) && !argv[1].isString())
2243 if ((argc > 2) && !argv[2].
isNumber())
2249 const int n = argc > 2 ? argv[2].
toInt32() : -1;
2252 if (ep->propertyCapture)
2253 ep->propertyCapture->captureTranslation();
2326 if (!argv[0].isString())
2328 if (argc > 1 && !argv[1].
isNumber())
2336 if (ep->propertyCapture)
2337 ep->propertyCapture->captureTranslation();
2339 return Encode(scope.engine->newString(
qtTrId(argv[0].toQStringNoThrow().
toUtf8().constData(),
n)));
2378 auto mm =
b->engine()->memoryManager;
2393 if (
arg->isInteger())
2395 else if (
arg->isDouble())
2397 else if (
arg->isBoolean())
2426#include "moc_qqmlbuiltinfunctions_p.cpp"
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
static QByteArray fromBase64(const QByteArray &base64, Base64Options options=Base64Encoding)
static QString translate(const char *context, const char *key, const char *disambiguation=nullptr, int n=-1)
\threadsafe
static QByteArray hash(QByteArrayView data, Algorithm method)
Returns the hash of data using method.
\inmodule QtCore\reentrant
QTime time() const
Returns the time part of the datetime.
QDateTime toLocalTime() const
Returns a copy of this datetime converted to local time.
bool isValid() const
Returns true if this datetime represents a definite moment, otherwise false.
QDate date() const
Returns the date part of the datetime.
\inmodule QtCore \reentrant
constexpr bool isValid() const
Returns true if this date is valid; otherwise returns false.
QString completeBaseName() const
Returns the complete base name of the file without the path.
static QJSEnginePrivate * get(QJSEngine *e)
The QJSEngine class provides an environment for evaluating JavaScript code.
QV4::ExecutionEngine * handle() const
void throwError(const QString &message)
Throws a run-time error (exception) with the given message.
QJSValue newArray(uint length=0)
Creates a JavaScript object of class Array with the given length.
QJSValue toScriptValue(const T &value)
Creates a QJSValue with the given value.
@ GarbageCollectionExtension
static QJSValue fromReturnedValue(QV4::ReturnedValue d)
The QJSValue class acts as a container for Qt/JavaScript data types.
QString toString(qlonglong i) const
Returns a localized string representation of i.
void void Q_DECL_COLD_FUNCTION void warning(const char *msg,...) const Q_ATTRIBUTE_FORMAT_PRINTF(2
Logs a warning message specified with format msg.
void void Q_DECL_COLD_FUNCTION void Q_DECL_COLD_FUNCTION void critical(const char *msg,...) const Q_ATTRIBUTE_FORMAT_PRINTF(2
Logs a critical message specified with format msg.
void debug(const char *msg,...) const Q_ATTRIBUTE_FORMAT_PRINTF(2
Logs a debug message specified with format msg.
QObject * parent() const
Returns a pointer to the parent object.
\inmodule QtCore\reentrant
virtual QVariant lighter(const QVariant &, qreal)
virtual QVariant tint(const QVariant &, const QVariant &)
virtual QVariant fromRgbF(double, double, double, double)
virtual QVariant fromHsvF(double, double, double, double)
virtual QVariant fromHslF(double, double, double, double)
virtual QVariant darker(const QVariant &, qreal)
virtual QVariant alpha(const QVariant &, qreal)
static QQmlComponentPrivate * get(QQmlComponent *c)
The QQmlComponent class encapsulates a QML component definition.
CompilationMode
Specifies whether the QQmlComponent should load the component immediately, or asynchonously.
static QQmlRefPointer< QQmlContextData > get(QQmlContext *context)
The QQmlContext class defines a context within a QML engine.
bool isValid() const
Returns whether the context is valid.
static QQmlData * get(QObjectPrivate *priv, bool create)
static QQmlEnginePrivate * get(QQmlEngine *e)
The QQmlEngine class provides an environment for instantiating QML components.
The QQmlError class encapsulates a QML error.
static QString urlToLocalFileOrQrc(const QString &)
If url is a local file returns a path suitable for passing to \l{QFile}.
virtual bool openUrlExternally(const QUrl &)
virtual QStringList fontFamilies()
virtual QQmlApplication * application(QObject *parent)
virtual QObject * styleHints()
virtual QObject * inputMethod()
static QVariant createValueType(const QJSValue &, QMetaType)
\inmodule QtCore\reentrant
\macro QT_RESTRICTED_CAST_FROM_ASCII
qsizetype lastIndexOf(QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
bool isEmpty() const noexcept
Returns true if the string has no characters; otherwise returns false.
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool endsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string ends with s; otherwise returns false.
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QByteArray toUtf8() const &
\inmodule QtCore \reentrant
bool isValid() const
Returns true if the time is valid; otherwise returns false.
QString fileName(ComponentFormattingOptions options=FullyDecoded) const
bool isRelative() const
Returns true if the URL is relative; otherwise returns false.
bool isValid() const
Returns true if the URL is non-empty and valid; otherwise returns false.
bool isEmpty() const
Returns true if the URL has no data; otherwise returns false.
static QJSValue method_include(QV4::ExecutionEngine *engine, const QUrl &url, const QJSValue &callbackFunction)
ObjectType::Data * allocate(Args &&... args)
bool isValid() const
Returns true if the storage type of this variant is not QMetaType::UnknownType; otherwise returns fal...
static auto fromValue(T &&value) noexcept(std::is_nothrow_copy_constructible_v< T > &&Private::CanUseInternalSpace< T >) -> std::enable_if_t< std::conjunction_v< std::is_copy_constructible< T >, std::is_destructible< T > >, QVariant >
Q_INVOKABLE QVariant darker(const QJSValue &color, double factor=2.0) const
\qmlmethod color Qt::darker(color baseColor, real factor)
Q_INVOKABLE bool colorEqual(const QVariant &lhs, const QVariant &rhs) const
\qmlmethod color Qt::colorEqual(color lhs, string rhs)
Q_INVOKABLE QString formatDate(QDate date, const QString &format) const
Q_INVOKABLE QVariant font(const QJSValue &fontSpecifier) const
\qmlmethod font Qt::font(object fontSpecifier)
Q_INVOKABLE bool isQtObject(const QJSValue &value) const
\qmlmethod bool Qt::isQtObject(object)
Q_INVOKABLE QString formatTime(QTime time, const QString &format) const
Q_INVOKABLE QUrl url(const QUrl &url) const
\qmlmethod url Qt::url(url url)
Q_INVOKABLE QVariant hsla(double h, double s, double l, double a=1) const
\qmlmethod color Qt::hsla(real hue, real saturation, real lightness, real alpha)
Q_INVOKABLE QVariant hsva(double h, double s, double v, double a=1) const
Q_INVOKABLE void quit() const
\qmlmethod Qt::quit()
Q_INVOKABLE void callLater(QQmlV4FunctionPtr args)
Q_INVOKABLE void exit(int retCode) const
\qmlmethod Qt::exit(int retCode)
QQmlApplication * application
Q_INVOKABLE QSizeF size(double width, double height) const
\qmlmethod size Qt::size(real width, real height)
Q_INVOKABLE QVariant quaternion(double scalar, double x, double y, double z) const
\qmlmethod quaternion Qt::quaternion(real scalar, real x, real y, real z)
Q_INVOKABLE QVariant matrix4x4() const
\qmlmethod matrix4x4 Qt::matrix4x4()
Q_INVOKABLE QVariant lighter(const QJSValue &color, double factor=1.5) const
\qmlmethod color Qt::lighter(color baseColor, real factor)
static QtObject * create(QQmlEngine *, QJSEngine *jsEngine)
Q_INVOKABLE QVariant vector3d(double x, double y, double z) const
\qmlmethod vector3d Qt::vector3d(real x, real y, real z)
Q_INVOKABLE QQmlComponent * createComponent(const QUrl &url, QObject *parent) const
\qmlmethod Component Qt::createComponent(url url, enumeration mode, QtObject parent)
Q_INVOKABLE QVariant tint(const QJSValue &baseColor, const QJSValue &tintColor) const
\qmlmethod color Qt::tint(color baseColor, color tintColor)
Q_INVOKABLE QVariant rgba(double r, double g, double b, double a=1) const
\qmlmethod color Qt::rgba(real red, real green, real blue, real alpha)
Q_INVOKABLE QString md5(const QString &data) const
\qmlmethod string Qt::md5(data) Returns a hex string of the md5 hash of data.
Q_INVOKABLE QString btoa(const QString &data) const
\qmlmethod string Qt::btoa(data) Binary to ASCII - this function returns a base64 encoding of data.
Q_INVOKABLE QRectF rect(double x, double y, double width, double height) const
\qmlmethod rect Qt::rect(real x, real y, real width, real height)
Q_INVOKABLE QVariant alpha(const QJSValue &baseColor, double value) const
\qmlmethod color Qt::alpha(color baseColor, real value)
Q_INVOKABLE bool openUrlExternally(const QUrl &url) const
\qmlmethod bool Qt::openUrlExternally(url target)
Q_INVOKABLE QUrl resolvedUrl(const QUrl &url) const
\qmlmethod url Qt::resolvedUrl(url url)
Q_INVOKABLE QVariant color(const QString &name) const
\qmlmethod color Qt::color(string name)
Q_INVOKABLE QJSValue binding(const QJSValue &function) const
\qmlmethod Qt::binding(function)
Q_INVOKABLE QVariant vector4d(double x, double y, double z, double w) const
\qmlmethod vector4d Qt::vector4d(real x, real y, real z, real w)
Q_INVOKABLE QStringList fontFamilies() const
\qmlmethod list<string> Qt::fontFamilies()
Q_INVOKABLE QJSValue include(const QString &url, const QJSValue &callback=QJSValue()) const
Q_INVOKABLE QString atob(const QString &data) const
\qmlmethod string Qt::atob(data) ASCII to binary - this function decodes the base64 encoded data stri...
Q_INVOKABLE QObject * createQmlObject(const QString &qml, QObject *parent, const QUrl &url=QUrl(QStringLiteral("inline"))) const
\qmlmethod object Qt::createQmlObject(string qml, object parent, string filepath)
Q_INVOKABLE QString formatDateTime(const QDateTime &date, const QString &format) const
Q_INVOKABLE QPointF point(double x, double y) const
\qmlmethod point Qt::point(real x, real y)
Q_INVOKABLE QVariant vector2d(double x, double y) const
\qmlmethod vector2d Qt::vector2d(real x, real y)
const QLoggingCategory & category()
[1]
QJSManagedValue managed(std::move(val), &engine)
Q_QML_EXPORT QVariant colorFromString(const QString &, bool *ok=nullptr)
Combined button and popup list for selecting options.
int toUtf8(char16_t u, OutputPtr &dst, InputPtr &src, InputPtr end)
Scoped< String > ScopedString
Scoped< ExecutionContext > ScopedContext
DBusConnection const char DBusError * error
typedef QByteArray(EGLAPIENTRYP PFNQGSGETDISPLAYSPROC)()
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
static QV4::ExecutionEngine * v4Engine(QV4::Value *d)
#define Q_LOGGING_CATEGORY(name,...)
#define qCWarning(category,...)
#define Q_STATIC_LOGGING_CATEGORY(name,...)
constexpr const T & qBound(const T &min, const T &val, const T &max)
static bool isNumber(char s)
constexpr T qAbs(const T &t)
GLint GLfloat GLfloat GLfloat v2
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat z
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLenum GLsizei length
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLuint GLsizei const GLchar * message
GLint GLsizei GLsizei GLenum format
GLfloat GLfloat GLfloat GLfloat h
GLsizei const GLchar *const * path
static qreal component(const QPointF &point, unsigned int i)
#define THROW_TYPE_ERROR_WITH_MESSAGE(msg)
static QTime dateTimeToTime(const QDateTime &dateTime)
static QString serializeArray(Object *array, ExecutionEngine *v4, QSet< QV4::Heap::Object * > &alreadySeen)
static QVariant constructFromJSValue(QJSEngine *e, QMetaType type, T... parameters)
void addParameters< double >(QJSEngine *, QJSValue &result, int i, double parameter)
static std::optional< QDate > dateFromString(const QString &string, QV4::ExecutionEngine *engine)
\qmlmethod string Qt::formatDate(datetime date, variant format, variant localeFormatOption)
static ReturnedValue writeToConsole(const FunctionObject *b, const Value *argv, int argc, ConsoleLogTypes logType, bool printStack=false)
void addParameters(QJSEngine *e, QJSValue &result, int i, T parameter)
static QString jsStack(QV4::ExecutionEngine *engine)
static std::optional< QTime > timeFromString(const QString &string, QV4::ExecutionEngine *engine)
\qmlmethod string Qt::formatTime(datetime time, variant format, variant localeFormatOption)
static std::optional< QDateTime > dateTimeFromString(const QString &string, QV4::ExecutionEngine *engine)
\qmlmethod string Qt::formatDateTime(datetime dateTime, variant format, variant localeFormatOption)
static QVariant colorVariantFromJSValue(const QJSValue &color, bool *ok)
Q_AUTOTEST_EXPORT QQmlGuiProvider * QQml_guiProvider(void)
Q_AUTOTEST_EXPORT QQmlColorProvider * QQml_colorProvider(void)
#define qPrintable(string)
QLatin1StringView QLatin1String
#define QStringLiteral(str)
static double elapsed(qint64 after, qint64 before)
Q_CORE_EXPORT QString qtTrId(const char *id, int n=-1)
#define THROW_GENERIC_ERROR(str)
#define DEFINE_OBJECT_VTABLE(classname)
if(qFloatDistance(a, b)<(1<< 7))
[0]
QUrl url("example.com")
[constructor-url-reference]
engine globalObject().setProperty("myObject"
\inmodule QtCore \reentrant
static ReturnedValue method_profile(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_warn(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_log(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_count(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_info(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_timeEnd(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_exception(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_assert(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_time(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_error(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_profileEnd(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_trace(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)
static QDate dateTimeToDate(const QDateTime &dateTime)
static QDateTime stringToDateTime(const QString &string, ExecutionEngine *engine)
static constexpr ReturnedValue undefined()
MemoryManager * memoryManager
CppStackFrame * currentStackFrame
QQmlRefPointer< QQmlContextData > callingQmlContext() const
Object * stringPrototype() const
ReturnedValue throwError(const Value &value)
Heap::Object * newObject()
int consoleCountHelper(const QString &file, quint16 line, quint16 column)
Heap::String * newString(char16_t c)
QJSEngine * jsEngine() const
void startTimer(const QString &timerName)
QQmlEngine * qmlEngine() const
qint64 stopTimer(const QString &timerName, bool *wasRunning)
Heap::ArrayObject * newArrayObject(int count=0)
ReturnedValue throwTypeError()
Heap::Object * newErrorObject(const Value &value)
static void init(Object *globalObject, QJSEngine::Extensions extensions)
static ReturnedValue method_gc(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)
\qmlmethod void Qt::gc()
static ReturnedValue method_string_arg(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)
V4_NEEDS_DESTROY Heap::ExecutionContext * scope() const
Function * function() const
ExecutionEngine * engine() const
void defineDefaultProperty(StringOrSymbol *name, const Value &value, PropertyAttributes attributes=Attr_Data|Attr_NotEnumerable)
bool set(StringOrSymbol *name, const Value &v, ThrowOnFailure shouldThrow)
QQmlSourceLocation currentLocation() const
Heap::JavaScriptFunctionObject * bindingFunction() const
static ReturnedValue virtualCall(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc)
constexpr ReturnedValue asReturnedValue() const
static constexpr Value fromInt32(int i)
QString toQString() const
QString toQStringNoThrow() const