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>.
Loading...
Searching...
No Matches
QQmlMetaObject Class Reference

#include <qqmlmetaobject_p.h>

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

Public Types

template<qsizetype Prealloc>
using ArgTypeStorage = QVarLengthArray<QMetaType, Prealloc>
 

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
 
template<typename ArgTypeStorage >
bool methodParameterTypes (int index, ArgTypeStorage *argStorage, QByteArray *unknownTypeError) const
 
template<typename ArgTypeStorage >
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)
 
template<typename ArgTypeStorage >
static bool methodParameterTypes (const QMetaMethod &method, ArgTypeStorage *argStorage, QByteArray *unknownTypeError)
 
template<typename ArgTypeStorage >
static bool methodReturnAndParameterTypes (const QMetaMethod &method, ArgTypeStorage *argStorage, QByteArray *unknownTypeError)
 

Static Protected Member Functions

template<typename Store >
static bool parameterType (const QMetaMethod &method, int ii, QByteArray *unknownTypeError, const Store &store)
 

Protected Attributes

const QMetaObject_m = nullptr
 

Detailed Description

Definition at line 34 of file qqmlmetaobject_p.h.

Member Typedef Documentation

◆ ArgTypeStorage

template<qsizetype Prealloc>
using QQmlMetaObject::ArgTypeStorage = QVarLengthArray<QMetaType, Prealloc>

Definition at line 38 of file qqmlmetaobject_p.h.

Constructor & Destructor Documentation

◆ QQmlMetaObject() [1/5]

QQmlMetaObject::QQmlMetaObject ( )
inlinedefault

◆ QQmlMetaObject() [2/5]

QQmlMetaObject::QQmlMetaObject ( const QObject * o)
inline

Definition at line 174 of file qqmlmetaobject_p.h.

References _m, and o.

◆ QQmlMetaObject() [3/5]

QQmlMetaObject::QQmlMetaObject ( const QMetaObject * m)
inline

Definition at line 180 of file qqmlmetaobject_p.h.

◆ QQmlMetaObject() [4/5]

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

Definition at line 185 of file qqmlmetaobject_p.h.

References _m.

◆ QQmlMetaObject() [5/5]

QQmlMetaObject::QQmlMetaObject ( const QQmlMetaObject & o)
inline

Definition at line 191 of file qqmlmetaobject_p.h.

Member Function Documentation

◆ canConvert()

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

Definition at line 86 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 207 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()

template<typename ArgTypeStorage >
bool QQmlMetaObject::constructorParameterTypes ( int index,
ArgTypeStorage * dummy,
QByteArray * unknownTypeError ) const
inline

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

Definition at line 78 of file qqmlmetaobject_p.h.

◆ isNull()

bool QQmlMetaObject::isNull ( ) const
inline

Definition at line 202 of file qqmlmetaobject_p.h.

References _m.

Referenced by canConvert(), and isObjectCompatible().

+ Here is the caller graph for this function:

◆ metaObject()

const QMetaObject * QQmlMetaObject::metaObject ( ) const
inline

Definition at line 221 of file qqmlmetaobject_p.h.

References _m.

Referenced by canConvert(), className(), QQmlObjectOrGadget::metacall(), propertyCount(), and resolveGadgetMethodOrPropertyIndex().

+ Here is the caller graph for this function:

◆ methodParameterTypes() [1/2]

template<typename ArgTypeStorage >
static bool QQmlMetaObject::methodParameterTypes ( const QMetaMethod & method,
ArgTypeStorage * argStorage,
QByteArray * unknownTypeError )
inlinestatic

Definition at line 98 of file qqmlmetaobject_p.h.

References method, and Q_ASSERT.

◆ methodParameterTypes() [2/2]

template<typename ArgTypeStorage >
bool QQmlMetaObject::methodParameterTypes ( int index,
ArgTypeStorage * argStorage,
QByteArray * unknownTypeError ) const
inline

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

Definition at line 63 of file qqmlmetaobject_p.h.

References Q_ASSERT.

Referenced by QV4::QObjectSlotDispatcher::impl().

+ Here is the caller graph for this function:

◆ methodReturnAndParameterTypes()

template<typename ArgTypeStorage >
static bool QQmlMetaObject::methodReturnAndParameterTypes ( const QMetaMethod & method,
ArgTypeStorage * argStorage,
QByteArray * unknownTypeError )
inlinestatic

Definition at line 116 of file qqmlmetaobject_p.h.

References QMetaType::IsEnumeration, method, and Q_ASSERT.

Referenced by QQmlConnectionSlotDispatcher::QQmlConnectionSlotDispatcher().

+ 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 196 of file qqmlmetaobject_p.h.

References _m, and o.

◆ parameterType()

template<typename Store >
static bool QQmlMetaObject::parameterType ( const QMetaMethod & method,
int ii,
QByteArray * unknownTypeError,
const Store & store )
inlinestaticprotected

Definition at line 150 of file qqmlmetaobject_p.h.

References QMetaType::IsEnumeration, and method.

◆ propertyCount()

int QQmlMetaObject::propertyCount ( ) const
inline

Definition at line 214 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: