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
qqmlglobal.cpp File Reference

(61e9aa7f5795258951d39ded70f14772b6ee2381)

#include <QtQml/private/qjsvalue_p.h>
#include <QtQml/private/qqmlglobal_p.h>
#include <QtQml/private/qqmlmetatype_p.h>
#include <QtQml/private/qv4qobjectwrapper_p.h>
#include <QtQml/private/qv4alloca_p.h>
#include <QtQml/qqmlengine.h>
#include <QtCore/private/qvariant_p.h>
#include <QtCore/qcoreapplication.h>
#include <QtCore/qdebug.h>
#include <QtCore/qstringlist.h>
#include "moc_qqmlglobal_p.cpp"
Include dependency graph for qqmlglobal.cpp:

Go to the source code of this file.

Functions

static QT_BEGIN_NAMESPACE void printConversionWarning (QV4::ExecutionEngine *engine, const QString &propertyValue, const QString &propertyType, const QString &propertyName)
static bool isConstructibleMetaType (const QMetaType metaType)
template<typename JSValue>
JSValue nullValue ()
template<typename JSValue>
bool coerceToJSValue (QMetaType fromType, const void *from, JSValue *to)
static bool coerceValue (QMetaType fromType, const void *from, QMetaType toType, void *to, QV4::ExecutionEngine *engine)
static voidcreateVariantData (QMetaType type, QVariant *variant)
static void callConstructor (const QMetaObject *targetMetaObject, int i, void **args, int argc, void *target)
static void callConstructor (const QMetaObject *targetMetaObject, int i, void *source, void *target)
template<typename Allocate>
static void fromVerifiedType (const QMetaObject *targetMetaObject, int ctorIndex, void **args, Allocate &&allocate)
template<typename Allocate, typename Retrieve>
static bool fromMatchingType (const QMetaObject *targetMetaObject, Allocate &&allocate, Retrieve &&retrieve, QV4::ExecutionEngine *engine)
template<typename Allocate>
static bool fromMatchingType (const QMetaObject *targetMetaObject, const QV4::Value &source, Allocate &&allocate, QV4::ExecutionEngine *engine)
template<typename Allocate>
static bool fromMatchingType (const QMetaObject *targetMetaObject, QVariant source, Allocate &&allocate, QV4::ExecutionEngine *engine)
template<typename Allocate>
static bool fromString (const QMetaObject *mo, QString s, Allocate &&allocate)
template<typename Get, typename Convert>
static bool doWriteProperty (const QMetaProperty &metaProperty, void *target, Get &&get, Convert &&convert, QV4::ExecutionEngine *engine)
static void doWriteProperties (const QMetaObject *targetMetaObject, void *target, const QV4::Value &source, QV4::ExecutionEngine *engine)
static QVariant byProperties (const QMetaObject *targetMetaObject, QMetaType metaType, const QV4::Value &source, QV4::ExecutionEngine *engine)
template<typename Read>
static void doWriteProperties (const QMetaObject *targetMetaObject, void *target, const QMetaObject *sourceMetaObject, Read &&read, QV4::ExecutionEngine *engine)
static void doWriteProperties (const QMetaObject *targetMeta, void *target, QObject *source, QV4::ExecutionEngine *engine)
static QVariant byProperties (const QMetaObject *targetMetaObject, QMetaType targetMetaType, QObject *source, QV4::ExecutionEngine *engine)
static QVariant byProperties (const QMetaObject *targetMetaObject, QMetaType targetMetaType, const QMetaObject *sourceMetaObject, const void *source, QV4::ExecutionEngine *engine)
template<typename Map>
void doWriteProperties (const QMetaObject *targetMetaObject, void *target, const Map &source, QV4::ExecutionEngine *engine)
template<typename Map>
QVariant byProperties (const QMetaObject *targetMetaObject, QMetaType targetMetaType, const Map &source, QV4::ExecutionEngine *engine)
static QVariant byProperties (const QMetaObject *targetMetaObject, QMetaType targetMetaType, const QVariant &source, QV4::ExecutionEngine *engine)
template<typename Allocate, typename DefaultConstruct>
bool createOrConstructValueType (const QQmlType &targetType, const QV4::Value &source, Allocate &&allocate, DefaultConstruct &&defaultConstruct, QV4::ExecutionEngine *engine)
template<typename Allocate, typename DefaultConstruct>
bool createOrConstructValueType (const QQmlType &targetType, QMetaType sourceMetaType, void *source, Allocate &&allocate, DefaultConstruct &&defaultConstruct, QV4::ExecutionEngine *engine)
static QVariant fromJSValue (const QQmlType &type, const QJSValue &s, QMetaType metaType)
Q_QML_EXPORT QQmlColorProviderQQml_setColorProvider (QQmlColorProvider *newProvider)
static QQmlColorProvider ** getColorProvider (void)
Q_AUTOTEST_EXPORT QQmlColorProviderQQml_colorProvider (void)
Q_QML_EXPORT QQmlGuiProviderQQml_setGuiProvider (QQmlGuiProvider *newProvider)
static QQmlGuiProvider ** getGuiProvider (void)
Q_AUTOTEST_EXPORT QQmlGuiProviderQQml_guiProvider (void)
static const QQmlDataddata_for_cast (QObject *object)
bool qmlobject_can_cpp_cast (QObject *object, const QMetaObject *mo)
bool qmlobject_can_qml_cast (QObject *object, const QQmlType &type)

Variables

static QQmlColorProvidercolorProvider = nullptr
static QQmlGuiProviderguiProvider = nullptr

Function Documentation

◆ byProperties() [1/5]

QVariant byProperties ( const QMetaObject * targetMetaObject,
QMetaType metaType,
const QV4::Value & source,
QV4::ExecutionEngine * engine )
static

Definition at line 417 of file qqmlglobal.cpp.

◆ byProperties() [2/5]

template<typename Map>
QVariant byProperties ( const QMetaObject * targetMetaObject,
QMetaType targetMetaType,
const Map & source,
QV4::ExecutionEngine * engine )

Definition at line 552 of file qqmlglobal.cpp.

◆ byProperties() [3/5]

QVariant byProperties ( const QMetaObject * targetMetaObject,
QMetaType targetMetaType,
const QMetaObject * sourceMetaObject,
const void * source,
QV4::ExecutionEngine * engine )
static

Definition at line 494 of file qqmlglobal.cpp.

◆ byProperties() [4/5]

QVariant byProperties ( const QMetaObject * targetMetaObject,
QMetaType targetMetaType,
const QVariant & source,
QV4::ExecutionEngine * engine )
static

Definition at line 561 of file qqmlglobal.cpp.

◆ byProperties() [5/5]

QVariant byProperties ( const QMetaObject * targetMetaObject,
QMetaType targetMetaType,
QObject * source,
QV4::ExecutionEngine * engine )
static

Definition at line 482 of file qqmlglobal.cpp.

◆ callConstructor() [1/2]

void callConstructor ( const QMetaObject * targetMetaObject,
int i,
void ** args,
int argc,
void * target )
static

Definition at line 194 of file qqmlglobal.cpp.

◆ callConstructor() [2/2]

void callConstructor ( const QMetaObject * targetMetaObject,
int i,
void * source,
void * target )
static

Definition at line 203 of file qqmlglobal.cpp.

◆ coerceToJSValue()

template<typename JSValue>
bool coerceToJSValue ( QMetaType fromType,
const void * from,
JSValue * to )

Definition at line 98 of file qqmlglobal.cpp.

◆ coerceValue()

bool coerceValue ( QMetaType fromType,
const void * from,
QMetaType toType,
void * to,
QV4::ExecutionEngine * engine )
static

Definition at line 135 of file qqmlglobal.cpp.

◆ createOrConstructValueType() [1/2]

template<typename Allocate, typename DefaultConstruct>
bool createOrConstructValueType ( const QQmlType & targetType,
const QV4::Value & source,
Allocate && allocate,
DefaultConstruct && defaultConstruct,
QV4::ExecutionEngine * engine )

Definition at line 604 of file qqmlglobal.cpp.

◆ createOrConstructValueType() [2/2]

template<typename Allocate, typename DefaultConstruct>
bool createOrConstructValueType ( const QQmlType & targetType,
QMetaType sourceMetaType,
void * source,
Allocate && allocate,
DefaultConstruct && defaultConstruct,
QV4::ExecutionEngine * engine )

Definition at line 649 of file qqmlglobal.cpp.

◆ createVariantData()

void * createVariantData ( QMetaType type,
QVariant * variant )
static

Definition at line 178 of file qqmlglobal.cpp.

◆ ddata_for_cast()

const QQmlData * ddata_for_cast ( QObject * object)
static

Definition at line 1092 of file qqmlglobal.cpp.

◆ doWriteProperties() [1/4]

void doWriteProperties ( const QMetaObject * targetMeta,
void * target,
QObject * source,
QV4::ExecutionEngine * engine )
static

Definition at line 472 of file qqmlglobal.cpp.

◆ doWriteProperties() [2/4]

template<typename Map>
void doWriteProperties ( const QMetaObject * targetMetaObject,
void * target,
const Map & source,
QV4::ExecutionEngine * engine )

Definition at line 511 of file qqmlglobal.cpp.

◆ doWriteProperties() [3/4]

template<typename Read>
void doWriteProperties ( const QMetaObject * targetMetaObject,
void * target,
const QMetaObject * sourceMetaObject,
Read && read,
QV4::ExecutionEngine * engine )
static

Definition at line 430 of file qqmlglobal.cpp.

◆ doWriteProperties() [4/4]

void doWriteProperties ( const QMetaObject * targetMetaObject,
void * target,
const QV4::Value & source,
QV4::ExecutionEngine * engine )
static

Definition at line 362 of file qqmlglobal.cpp.

◆ doWriteProperty()

template<typename Get, typename Convert>
bool doWriteProperty ( const QMetaProperty & metaProperty,
void * target,
Get && get,
Convert && convert,
QV4::ExecutionEngine * engine )
static

Definition at line 334 of file qqmlglobal.cpp.

◆ fromJSValue()

QVariant fromJSValue ( const QQmlType & type,
const QJSValue & s,
QMetaType metaType )
static

Definition at line 807 of file qqmlglobal.cpp.

◆ fromMatchingType() [1/3]

template<typename Allocate, typename Retrieve>
bool fromMatchingType ( const QMetaObject * targetMetaObject,
Allocate && allocate,
Retrieve && retrieve,
QV4::ExecutionEngine * engine )
static

Definition at line 222 of file qqmlglobal.cpp.

◆ fromMatchingType() [2/3]

template<typename Allocate>
bool fromMatchingType ( const QMetaObject * targetMetaObject,
const QV4::Value & source,
Allocate && allocate,
QV4::ExecutionEngine * engine )
static

Definition at line 294 of file qqmlglobal.cpp.

◆ fromMatchingType() [3/3]

template<typename Allocate>
bool fromMatchingType ( const QMetaObject * targetMetaObject,
QVariant source,
Allocate && allocate,
QV4::ExecutionEngine * engine )
static

Definition at line 307 of file qqmlglobal.cpp.

◆ fromString()

template<typename Allocate>
bool fromString ( const QMetaObject * mo,
QString s,
Allocate && allocate )
static

Definition at line 317 of file qqmlglobal.cpp.

◆ fromVerifiedType()

template<typename Allocate>
void fromVerifiedType ( const QMetaObject * targetMetaObject,
int ctorIndex,
void ** args,
Allocate && allocate )
static

Definition at line 212 of file qqmlglobal.cpp.

◆ getColorProvider()

QQmlColorProvider ** getColorProvider ( void )
static

Definition at line 951 of file qqmlglobal.cpp.

References colorProvider.

◆ getGuiProvider()

QQmlGuiProvider ** getGuiProvider ( void )
static

Definition at line 1005 of file qqmlglobal.cpp.

References guiProvider.

◆ isConstructibleMetaType()

bool isConstructibleMetaType ( const QMetaType metaType)
static

Definition at line 32 of file qqmlglobal.cpp.

◆ nullValue()

template<typename JSValue>
JSValue nullValue ( )

Definition at line 89 of file qqmlglobal.cpp.

◆ printConversionWarning()

QT_BEGIN_NAMESPACE void printConversionWarning ( QV4::ExecutionEngine * engine,
const QString & propertyValue,
const QString & propertyType,
const QString & propertyName )
static

Definition at line 18 of file qqmlglobal.cpp.

◆ qmlobject_can_cpp_cast()

bool qmlobject_can_cpp_cast ( QObject * object,
const QMetaObject * mo )

Definition at line 1099 of file qqmlglobal.cpp.

◆ qmlobject_can_qml_cast()

bool qmlobject_can_qml_cast ( QObject * object,
const QQmlType & type )

Definition at line 1107 of file qqmlglobal.cpp.

◆ QQml_colorProvider()

Q_AUTOTEST_EXPORT QQmlColorProvider * QQml_colorProvider ( void )

Definition at line 962 of file qqmlglobal.cpp.

◆ QQml_guiProvider()

Q_AUTOTEST_EXPORT QQmlGuiProvider * QQml_guiProvider ( void )

Definition at line 1015 of file qqmlglobal.cpp.

◆ QQml_setColorProvider()

Q_QML_EXPORT QQmlColorProvider * QQml_setColorProvider ( QQmlColorProvider * newProvider)

Definition at line 944 of file qqmlglobal.cpp.

◆ QQml_setGuiProvider()

Q_QML_EXPORT QQmlGuiProvider * QQml_setGuiProvider ( QQmlGuiProvider * newProvider)

Definition at line 998 of file qqmlglobal.cpp.

Variable Documentation

◆ colorProvider

QQmlColorProvider * colorProvider = nullptr
static

Definition at line 942 of file qqmlglobal.cpp.

Referenced by getColorProvider().

◆ guiProvider

QQmlGuiProvider * guiProvider = nullptr
static

Definition at line 996 of file qqmlglobal.cpp.

Referenced by getGuiProvider().