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
QQmlValueTypeProvider Class Reference

#include <qqmlglobal_p.h>

Collaboration diagram for QQmlValueTypeProvider:

Static Public Member Functions

static bool populateValueType (QMetaType targetMetaType, void *target, const QV4::Value &source, QV4::ExecutionEngine *engine)
static bool populateValueType (QMetaType targetMetaType, void *target, QMetaType sourceMetaType, void *source, QV4::ExecutionEngine *engine)
static Q_QML_EXPORT voidheapCreateValueType (const QQmlType &targetType, const QV4::Value &source, QV4::ExecutionEngine *engine)
static QVariant constructValueType (QMetaType targetMetaType, const QMetaObject *targetMetaObject, int ctorIndex, void **args)
static QVariant createValueType (const QJSValue &, QMetaType)
static QVariant createValueType (const QString &, QMetaType)
static QVariant createValueType (const QV4::Value &, QMetaType, QV4::ExecutionEngine *)
static QVariant Q_AUTOTEST_EXPORT createValueType (const QVariant &, QMetaType, QV4::ExecutionEngine *)

Detailed Description

Definition at line 186 of file qqmlglobal_p.h.

Member Function Documentation

◆ constructValueType()

QVariant QQmlValueTypeProvider::constructValueType ( QMetaType targetMetaType,
const QMetaObject * targetMetaObject,
int ctorIndex,
void ** args )
static

Definition at line 797 of file qqmlglobal.cpp.

◆ createValueType() [1/4]

QVariant QQmlValueTypeProvider::createValueType ( const QJSValue & s,
QMetaType metaType )
static

Definition at line 818 of file qqmlglobal.cpp.

◆ createValueType() [2/4]

QVariant QQmlValueTypeProvider::createValueType ( const QString & s,
QMetaType metaType )
static

Definition at line 825 of file qqmlglobal.cpp.

◆ createValueType() [3/4]

QVariant QQmlValueTypeProvider::createValueType ( const QV4::Value & s,
QMetaType metaType,
QV4::ExecutionEngine * engine )
static

Definition at line 841 of file qqmlglobal.cpp.

◆ createValueType() [4/4]

QVariant QQmlValueTypeProvider::createValueType ( const QVariant & s,
QMetaType metaType,
QV4::ExecutionEngine * engine )
static

This should only be called with either builtin types or wrapped QJSValues as source.

Definition at line 887 of file qqmlglobal.cpp.

◆ heapCreateValueType()

void * QQmlValueTypeProvider::heapCreateValueType ( const QQmlType & targetType,
const QV4::Value & source,
QV4::ExecutionEngine * engine )
static

Specialization that constructs the value type on the heap using new and returns a pointer to it.

Definition at line 775 of file qqmlglobal.cpp.

◆ populateValueType() [1/2]

bool QQmlValueTypeProvider::populateValueType ( QMetaType targetMetaType,
void * target,
const QV4::Value & source,
QV4::ExecutionEngine * engine )
static

Populate the value type in place at target, which is expected to be allocated and default-constructed, for example the result of a QVariant(QMetaType). This is efficient if we can do byProperties() since it can use the pre-constructed object. It also avoids the creation of a QVariant in most cases. It is not efficient if you're going to create a QVariant anyway.

Definition at line 755 of file qqmlglobal.cpp.

◆ populateValueType() [2/2]

bool QQmlValueTypeProvider::populateValueType ( QMetaType targetMetaType,
void * target,
QMetaType sourceMetaType,
void * source,
QV4::ExecutionEngine * engine )
static

Populate the value type in place at target, which is expected to be allocated and default-constructed, for example the result of a QVariant(QMetaType). This is efficient if we can do byProperties() since it can use the pre-constructed object. It also avoids the creation of a QVariant in most cases. It is not efficient if you're going to create a QVariant anyway.

Definition at line 718 of file qqmlglobal.cpp.


The documentation for this class was generated from the following files: