Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#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_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 629 of file qqmlglobal.cpp.
References createVariantData(), and fromVerifiedType().
Referenced by QQmlPrivate::AOTCompiledContext::constructValueType().
Definition at line 650 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 657 of file qqmlglobal.cpp.
References createVariantData(), fromJSValue(), fromString(), isConstructibleMetaType(), mo, and QQmlMetaType::qmlType().
|
static |
Definition at line 673 of file qqmlglobal.cpp.
References byProperties(), createVariantData(), fromJSValue(), fromMatchingType(), QJSValuePrivate::fromReturnedValue(), isConstructibleMetaType(), mo, QQmlMetaType::qmlType(), and qWarning.
This should only be called with either builtin types or wrapped QJSValues as source.
Definition at line 712 of file qqmlglobal.cpp.
References byProperties(), createVariantData(), fromMatchingType(), isConstructibleMetaType(), 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 607 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 588 of file qqmlglobal.cpp.
References createOrConstructValueType(), 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 558 of file qqmlglobal.cpp.
References QJSValuePrivate::asReturnedValue(), createOrConstructValueType(), isConstructibleMetaType(), populateValueType(), and QQmlMetaType::qmlType().