Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QQmlMetaObject Class Reference

#include <qqmlmetaobject_p.h>

+ Inheritance diagram for QQmlMetaObject:
+ Collaboration diagram for QQmlMetaObject:

Public Types

typedef QVarLengthArray< QMetaType, 9 > ArgTypeStorage
 

Public Member Functions

 QQmlMetaObject ()=default
 
 QQmlMetaObject (const QObject *)
 
 QQmlMetaObject (const QMetaObject *)
 
 QQmlMetaObject (const QQmlPropertyCache::ConstPtr &)
 
 QQmlMetaObject (const QQmlMetaObject &)
 
QQmlMetaObjectoperator= (const QQmlMetaObject &)
 
bool isNull () const
 
const char * className () const
 
int propertyCount () const
 
const QMetaObjectmetaObject () const
 
QMetaType methodReturnType (const QQmlPropertyData &data, QByteArray *unknownTypeError) const
 
bool methodParameterTypes (int index, ArgTypeStorage *argStorage, QByteArray *unknownTypeError) const
 
bool constructorParameterTypes (int index, ArgTypeStorage *dummy, QByteArray *unknownTypeError) const
 

Static Public Member Functions

static bool canConvert (const QQmlMetaObject &from, const QQmlMetaObject &to)
 
static void resolveGadgetMethodOrPropertyIndex (QMetaObject::Call type, const QMetaObject **metaObject, int *index)
 
static bool methodParameterTypes (const QMetaMethod &method, ArgTypeStorage *argStorage, QByteArray *unknownTypeError)
 

Protected Attributes

const QMetaObject_m = nullptr
 

Detailed Description

Definition at line 34 of file qqmlmetaobject_p.h.

Member Typedef Documentation

◆ ArgTypeStorage

Constructor & Destructor Documentation

◆ QQmlMetaObject() [1/5]

QQmlMetaObject::QQmlMetaObject ( )
inlinedefault

◆ QQmlMetaObject() [2/5]

QQmlMetaObject::QQmlMetaObject ( const QObject o)
inline

Definition at line 87 of file qqmlmetaobject_p.h.

References _m, and o.

◆ QQmlMetaObject() [3/5]

QQmlMetaObject::QQmlMetaObject ( const QMetaObject m)
inline

Definition at line 93 of file qqmlmetaobject_p.h.

◆ QQmlMetaObject() [4/5]

QQmlMetaObject::QQmlMetaObject ( const QQmlPropertyCache::ConstPtr m)
inline

Definition at line 98 of file qqmlmetaobject_p.h.

References _m.

◆ QQmlMetaObject() [5/5]

QQmlMetaObject::QQmlMetaObject ( const QQmlMetaObject o)
inline

Definition at line 104 of file qqmlmetaobject_p.h.

Member Function Documentation

◆ canConvert()

static bool QQmlMetaObject::canConvert ( const QQmlMetaObject from,
const QQmlMetaObject to 
)
inlinestatic

Definition at line 70 of file qqmlmetaobject_p.h.

References QMetaObject::inherits(), isNull(), metaObject(), and Q_ASSERT.

Referenced by instanceOfQObject(), isObjectCompatible(), QV4::QQmlTypeWrapper::virtualInstanceOf(), and QQmlPropertyPrivate::write().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ className()

const char * QQmlMetaObject::className ( ) const
inline

Definition at line 120 of file qqmlmetaobject_p.h.

References _m, QMetaObject::className(), and metaObject().

Referenced by QQmlPropertyCacheCreator< ObjectContainer >::createMetaObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ constructorParameterTypes()

bool QQmlMetaObject::constructorParameterTypes ( int  index,
ArgTypeStorage dummy,
QByteArray unknownTypeError 
) const

Returns false if one of the types is unknown. Otherwise, fills argstorage with the metatypes of the function.

Definition at line 68 of file qqmlmetaobject.cpp.

References _m, QMetaObject::constructor(), and methodParameterTypes().

+ Here is the call graph for this function:

◆ isNull()

bool QQmlMetaObject::isNull ( ) const
inline

Definition at line 115 of file qqmlmetaobject_p.h.

References _m.

Referenced by canConvert(), instanceOfQObject(), isObjectCompatible(), QObjectPointerBinding::write(), QQmlPropertyPrivate::write(), and QObjectPointerBinding::write().

+ Here is the caller graph for this function:

◆ metaObject()

const QMetaObject * QQmlMetaObject::metaObject ( ) const
inline

Definition at line 134 of file qqmlmetaobject_p.h.

References _m.

Referenced by canConvert(), className(), dynamicQmlMetaObject(), QQmlListReferencePrivate::elementType(), QQmlPrivate::isTypeCompatible(), QQmlPrivate::AOTCompiledContext::loadTypeLookup(), QQmlObjectOrGadget::metacall(), propertyCount(), and resolveGadgetMethodOrPropertyIndex().

+ Here is the caller graph for this function:

◆ methodParameterTypes() [1/2]

bool QQmlMetaObject::methodParameterTypes ( const QMetaMethod method,
ArgTypeStorage argStorage,
QByteArray unknownTypeError 
)
static

Definition at line 75 of file qqmlmetaobject.cpp.

References QMetaType::IsEnumeration, Q_ASSERT, QVarLengthArray< T, Prealloc >::resize(), and QMetaType::underlyingType().

+ Here is the call graph for this function:

◆ methodParameterTypes() [2/2]

bool QQmlMetaObject::methodParameterTypes ( int  index,
ArgTypeStorage argStorage,
QByteArray unknownTypeError 
) const

Returns false if one of the types is unknown. Otherwise, fills argstorage with the metatypes of the function.

Definition at line 59 of file qqmlmetaobject.cpp.

References _m, QMetaObject::method(), methodParameterTypes(), and Q_ASSERT.

Referenced by constructorParameterTypes(), QV4::QObjectSlotDispatcher::impl(), and methodParameterTypes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ methodReturnType()

QMetaType QQmlMetaObject::methodReturnType ( const QQmlPropertyData data,
QByteArray unknownTypeError 
) const

Definition at line 41 of file qqmlmetaobject.cpp.

References _m, QMetaType::IsEnumeration, QMetaObject::method(), Q_ASSERT, QMetaMethod::returnMetaType(), QMetaMethod::typeName(), and QMetaType::underlyingType().

+ Here is the call graph for this function:

◆ operator=()

QQmlMetaObject & QQmlMetaObject::operator= ( const QQmlMetaObject o)
inline

Definition at line 109 of file qqmlmetaobject_p.h.

References _m, and o.

◆ propertyCount()

int QQmlMetaObject::propertyCount ( ) const
inline

Definition at line 127 of file qqmlmetaobject_p.h.

References _m, metaObject(), and QMetaObject::propertyCount().

+ Here is the call graph for this function:

◆ resolveGadgetMethodOrPropertyIndex()

QT_BEGIN_NAMESPACE void QQmlMetaObject::resolveGadgetMethodOrPropertyIndex ( QMetaObject::Call  type,
const QMetaObject **  metaObject,
int *  index 
)
static

Definition at line 11 of file qqmlmetaobject.cpp.

References QMetaObject::InvokeMetaMethod, metaObject(), QMetaObject::methodOffset(), QMetaObject::propertyOffset(), Q_UNIMPLEMENTED, QMetaObject::ReadProperty, QMetaObject::ResetProperty, QMetaObject::superClass(), and QMetaObject::WriteProperty.

Referenced by QV4::getGadgetProperty(), QQmlGadgetPtrWrapper::metaCall(), and QQmlObjectOrGadget::metacall().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ _m


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