![]() |
Qt 6.x
The Qt SDK
|
#include <qqmlglobal_p.h>
Static Public Member Functions | |
static bool | populateValueType (QMetaType targetMetaType, void *target, const QV4::Value &source) |
static bool | populateValueType (QMetaType targetMetaType, void *target, QMetaType sourceMetaType, void *source) |
static Q_QML_PRIVATE_EXPORT void * | heapCreateValueType (const QQmlType &targetType, const QV4::Value &source) |
static QVariant | constructValueType (QMetaType targetMetaType, const QMetaObject *targetMetaObject, int ctorIndex, void *ctorArg) |
static QVariant | createValueType (const QJSValue &, QMetaType) |
static QVariant | createValueType (const QString &, QMetaType) |
static QVariant | createValueType (const QV4::Value &, QMetaType) |
static QVariant | createValueType (const QVariant &, QMetaType) |
Definition at line 206 of file qqmlglobal_p.h.
|
static |
Definition at line 626 of file qqmlglobal.cpp.
References createVariantData(), and fromVerifiedType().
Referenced by QQmlPrivate::AOTCompiledContext::constructValueType().
Definition at line 647 of file qqmlglobal.cpp.
References fromJSValue(), isConstructibleMetaType(), and QQmlMetaType::qmlType().
Referenced by constructFromJSValue(), doWriteProperties(), doWriteProperties(), doWriteProperties(), QtObject::font(), QtObject::matrix4x4(), QtObject::matrix4x4(), toVariant(), QV4::SequencePrototype::toVariant(), tryConvertAndAssign(), and QQmlStringConverters::variantFromString().
Definition at line 654 of file qqmlglobal.cpp.
References createVariantData(), fromJSValue(), fromString(), isConstructibleMetaType(), QQmlMetaType::metaObjectForValueType(), mo, and QQmlMetaType::qmlType().
|
static |
Definition at line 669 of file qqmlglobal.cpp.
References byProperties(), createVariantData(), fromJSValue(), fromMatchingType(), QJSValuePrivate::fromReturnedValue(), isConstructibleMetaType(), QQmlMetaType::metaObjectForValueType(), mo, QQmlMetaType::qmlType(), and qWarning.
This should only be called with either builtin types or wrapped QJSValues as source.
Definition at line 706 of file qqmlglobal.cpp.
References byProperties(), createVariantData(), fromMatchingType(), isConstructibleMetaType(), QQmlMetaType::metaObjectForValueType(), mo, QQmlMetaType::qmlType(), and qWarning.
|
static |
Specialization that constructs the value type on the heap using new and returns a pointer to it.
Definition at line 604 of file qqmlglobal.cpp.
References QMetaType::alignOf(), QMetaType::create(), createOrConstructValueType(), Q_ASSERT, QMetaType::sizeOf(), and QQmlType::typeId().
Referenced by QV4::coerce().
|
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 585 of file qqmlglobal.cpp.
References createOrConstructValueType(), QMetaType::destruct(), isConstructibleMetaType(), and QQmlMetaType::qmlType().
Referenced by QV4::ExecutionEngine::metaTypeFromJS(), and populateValueType().
|
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 555 of file qqmlglobal.cpp.
References QJSValuePrivate::asReturnedValue(), createOrConstructValueType(), QMetaType::destruct(), isConstructibleMetaType(), populateValueType(), and QQmlMetaType::qmlType().