![]() |
Qt 6.x
The Qt SDK
|
#include <qmetaobject_p.h>
Inheritance diagram for QMetaObjectPrivate:
Collaboration diagram for QMetaObjectPrivate:Public Types | |
| enum | { OutputRevision = 12 } |
| enum | { IntsPerMethod = QMetaMethod::Data::Size } |
| enum | { IntsPerEnum = QMetaEnum::Data::Size } |
| enum | { IntsPerProperty = QMetaProperty::Data::Size } |
| enum | DisconnectType { DisconnectAll , DisconnectOne } |
Static Public Member Functions | |
| static const QMetaObjectPrivate * | get (const QMetaObject *metaobject) |
| static int | originalClone (const QMetaObject *obj, int local_method_index) |
| static QByteArray | decodeMethodSignature (const char *signature, QArgumentTypeArray &types) |
| static int | indexOfSignalRelative (const QMetaObject **baseObject, const QByteArray &name, int argc, const QArgumentType *types) |
| static int | indexOfSlotRelative (const QMetaObject **m, const QByteArray &name, int argc, const QArgumentType *types) |
| static int | indexOfSignal (const QMetaObject *m, const QByteArray &name, int argc, const QArgumentType *types) |
| static int | indexOfSlot (const QMetaObject *m, const QByteArray &name, int argc, const QArgumentType *types) |
| static int | indexOfMethod (const QMetaObject *m, const QByteArray &name, int argc, const QArgumentType *types) |
| static int | indexOfConstructor (const QMetaObject *m, const QByteArray &name, int argc, const QArgumentType *types) |
| static Q_CORE_EXPORT QMetaMethod | signal (const QMetaObject *m, int signal_index) |
| static int | signalOffset (const QMetaObject *m) |
| static Q_CORE_EXPORT int | absoluteSignalCount (const QMetaObject *m) |
| static Q_CORE_EXPORT int | signalIndex (const QMetaMethod &m) |
| static bool | checkConnectArgs (int signalArgc, const QArgumentType *signalTypes, int methodArgc, const QArgumentType *methodTypes) |
| static bool | checkConnectArgs (const QMetaMethodPrivate *signal, const QMetaMethodPrivate *method) |
| static QList< QByteArray > | parameterTypeNamesFromSignature (const char *signature) |
| static void | memberIndexes (const QObject *obj, const QMetaMethod &member, int *signalIndex, int *methodIndex) |
| static QObjectPrivate::Connection * | connect (const QObject *sender, int signal_index, const QMetaObject *smeta, const QObject *receiver, int method_index_relative, const QMetaObject *rmeta=nullptr, int type=0, int *types=nullptr) |
| static bool | disconnect (const QObject *sender, int signal_index, const QMetaObject *smeta, const QObject *receiver, int method_index, void **slot, DisconnectType=DisconnectAll) |
| static bool | disconnectHelper (QObjectPrivate::ConnectionData *connections, int signalIndex, const QObject *receiver, int method_index, void **slot, QBasicMutex *senderMutex, DisconnectType=DisconnectAll) |
| template<int MethodType> | |
| static int | indexOfMethodRelative (const QMetaObject **baseObject, const QByteArray &name, int argc, const QArgumentType *types) |
| static bool | methodMatch (const QMetaObject *m, const QMetaMethod &method, const QByteArray &name, int argc, const QArgumentType *types) |
| static Q_CORE_EXPORT QMetaMethod | firstMethod (const QMetaObject *baseObject, QByteArrayView name) |
Public Attributes | |
| int | revision |
| int | className |
| int | classInfoCount |
| int | classInfoData |
| int | methodCount |
| int | methodData |
| int | propertyCount |
| int | propertyData |
| int | enumeratorCount |
| int | enumeratorData |
| int | constructorCount |
| int | constructorData |
| int | flags |
| int | signalCount |
Definition at line 170 of file qmetaobject_p.h.
| anonymous enum |
| Enumerator | |
|---|---|
| OutputRevision | |
Definition at line 179 of file qmetaobject_p.h.
| anonymous enum |
| Enumerator | |
|---|---|
| IntsPerMethod | |
Definition at line 180 of file qmetaobject_p.h.
| anonymous enum |
| Enumerator | |
|---|---|
| IntsPerEnum | |
Definition at line 181 of file qmetaobject_p.h.
| anonymous enum |
| Enumerator | |
|---|---|
| IntsPerProperty | |
Definition at line 182 of file qmetaobject_p.h.
| Enumerator | |
|---|---|
| DisconnectAll | |
| DisconnectOne | |
Definition at line 235 of file qmetaobject_p.h.
|
static |
Returns the number of signals for the class m, including the signals for the base class.
Similar to QMetaObject::methodCount(), but non-signal methods are excluded.
Definition at line 932 of file qmetaobject.cpp.
References priv(), Q_ASSERT, and signalCount.
Referenced by QMetaObject::connectSlotsByName(), and QQmlContext::setContextProperty().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Returns true if the signal and method arguments are compatible; otherwise returns false.
Definition at line 1007 of file qmetaobject.cpp.
References i, IsUnresolvedType, method, QMetaMethod::Signal, signal, typeFromTypeInfo(), and typeNameFromTypeInfo().
Here is the call graph for this function:
|
static |
Returns true if the signalTypes and methodTypes are compatible; otherwise returns false.
Definition at line 989 of file qmetaobject.cpp.
References i.
Referenced by QMetaObject::checkConnectArgs(), and QObject::connect().
Here is the caller graph for this function:
|
static |
Same as the QMetaObject::connect, but signal_index must be the result of QObjectPrivate::signalIndex
method_index is relative to the rmeta metaobject, if rmeta is \nullptr, then it is absolute index
the QObjectPrivate::Connection* has a refcount of 2, so it must be passed to a QMetaObject::Connection
Definition at line 3439 of file qobject.cpp.
References QObjectPrivate::addConnection(), c2, QObjectPrivate::connections, QMetaObject::d, get(), QObjectPrivate::get(), QMetaMethod::isValid(), QMetaObject::methodOffset(), Q_ASSERT, QThreadData::ref(), QObjectPrivate::Connection::sender, signal(), signalSlotLock(), QObjectPrivate::ConnectionData::signalVector, QObjectPrivate::ConnectionData::signalVectorCount(), Qt::SingleShotConnection, QMetaObject::Data::static_metacall, Qt::UniqueConnection, and QOrderedMutexLocker::unlock().
Referenced by QObject::connect(), QObject::connect(), QMetaObject::connect(), and QMetaObject::connectSlotsByName().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 778 of file qmetaobject.cpp.
References argumentTypesFromString(), QByteArray::fromRawData(), and Q_ASSERT.
Referenced by QObject::connect(), QObject::disconnect(), QMetaObject::indexOfConstructor(), QMetaObject::indexOfMethod(), QMetaObject::indexOfSignal(), QMetaObject::indexOfSlot(), and QObjectPrivate::signalIndex().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Same as the QMetaObject::disconnect, but signal_index must be the result of QObjectPrivate::signalIndex
Definition at line 3574 of file qobject.cpp.
References QObjectPrivate::ConnectionData::cleanOrphanedConnections(), QObjectPrivate::connections, QObjectPrivate::get(), QMetaMethod::isValid(), signal(), signalSlotLock(), QObjectPrivate::ConnectionData::signalVectorCount(), and QMutexLocker< Mutex >::unlock().
Referenced by QObject::disconnect(), QObject::disconnect(), QMetaObject::disconnect(), QObjectPrivate::disconnect(), and QMetaObject::disconnectOne().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Helper function to remove the connection from the senders list and set the receivers to \nullptr
Definition at line 3534 of file qobject.cpp.
References QObjectPrivate::connections, QOrderedMutexLocker::relock(), signalIndex, signalSlotLock(), and QMutex::unlock().
Here is the call graph for this function:
|
static |
Returns the first method with name name found in baseObject
Definition at line 669 of file qmetaobject.cpp.
References i, methodCount, priv(), and QMetaObject::superClass().
Referenced by QV4::QQmlValueTypeWrapper::dataForPropertyKey().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 194 of file qmetaobject_p.h.
References QMetaObject::d, and QMetaObject::Data::data.
Referenced by computeOffsets(), QObject::connect(), connect(), QQmlPropertyCache::copyAndAppend(), QObject::disconnect(), QMetaMethod::invokeOnGadget(), QMetaMethod::isConst(), metaObjectSignalCount(), originalClone(), and QObjectPrivate::signalIndex().
Here is the caller graph for this function:
|
static |
Definition at line 899 of file qmetaobject.cpp.
References constructorCount, i, method, methodMatch(), and priv().
Referenced by QMetaObject::indexOfConstructor().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 890 of file qmetaobject.cpp.
References i.
Referenced by QObject::disconnect(), and indexOfSignalRelative().
Here is the caller graph for this function:
|
inlinestatic |
helper function for indexOf{Method,Slot,Signal}, returns the relative index of the method within the baseObject MethodType might be MethodSignal or MethodSlot, or \nullptr to match everything.
Definition at line 690 of file qmetaobject.cpp.
References i, methodCount, methodMatch(), MethodSignal, MethodSlot, priv(), Q_ASSERT, revision, and signalCount.
Here is the call graph for this function:
|
static |
Definition at line 872 of file qmetaobject.cpp.
References i, and indexOfSignalRelative().
Here is the call graph for this function:
|
static |
Same as QMetaObject::indexOfSignal, but the result is the local offset to the base object.
baseObject will be adjusted to the enclosing QMetaObject, or \nullptr if the signal is not found
Definition at line 823 of file qmetaobject.cpp.
References QByteArray::constData(), i, indexOfMethod(), QMetaMethod::methodSignature(), objectClassName(), and qWarning.
Referenced by QObject::connect(), QObject::disconnect(), QMetaObject::indexOfSignal(), indexOfSignal(), and QObjectPrivate::signalIndex().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 881 of file qmetaobject.cpp.
References i, and indexOfSlotRelative().
Here is the call graph for this function:
|
static |
Definition at line 865 of file qmetaobject.cpp.
Referenced by QObject::connect(), QMetaObject::indexOfSlot(), and indexOfSlot().
Here is the caller graph for this function:
|
static |
This helper function calculates signal and method index for the given member in the specified class.
\list
This function is used by QObject::connect and QObject::disconnect which are working with QMetaMethod.
signalIndex is set to the signal index of member. If the member specified is not signal this variable is set to -1.
methodIndex is set to the method index of the member. If the member is not a method of the object specified by the obj argument this variable is set to -1.
Definition at line 2706 of file qobject.cpp.
References computeOffsets(), QMetaObject::d, QMetaMethod::methodType(), QMetaMethod::mobj, QMetaMethod::relativeMethodIndex(), QMetaMethod::Signal, signalIndex, and QMetaObject::Data::superdata.
Referenced by QObject::connect(), and QObject::disconnect().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 633 of file qmetaobject.cpp.
References i, method, priv(), stringData(), typeFromTypeInfo(), and typeNameFromTypeInfo().
Referenced by indexOfConstructor(), and indexOfMethodRelative().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
If the local_method_index is a cloned method, return the index of the original.
Example: if the index of "destroyed()" is passed, the index of "destroyed(QObject*)" is returned
Definition at line 4195 of file qmetaobject.cpp.
References get(), MethodCloned, methodCount, and Q_ASSERT.
Referenced by QObject::connect(), QObject::disconnect(), QObject::isSignalConnected(), methodIndexToSignalIndex(), and QObjectPrivate::signalIndex().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Returns the parameter type names extracted from the given signature.
Definition at line 4210 of file qmetaobject.cpp.
Referenced by QMetaMethodBuilderPrivate::parameterTypes().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Returns the signal for the given meta-object m at signal_index.
It it different from QMetaObject::method(); the index should not include non-signal methods.
Definition at line 966 of file qmetaobject.cpp.
References d, i, priv(), Q_ASSERT, signal, signalCount, and signalOffset().
Referenced by QSingleShotTimer::QSingleShotTimer(), QObject::~QObject(), QObject::connect(), connect(), QQmlNotifierEndpoint::connect(), QObjectPrivate::connectImpl(), QMetaObject::connectSlotsByName(), QQmlBinding::dependencies(), QQmlNotifierEndpoint::disconnect(), disconnect(), QObject::dumpObjectInfo(), QQmlBoundSignalExpression::evaluate(), QQmlPropertyCache::originalClone(), Q_TRACE_POINT(), QQmlBoundSignal_callback(), QTest::qSignalDumperCallback(), queued_activate(), QObjectPrivate::removeConnection(), QObject::senderSignalIndex(), QQmlData::signalEmitted(), and QQmlPropertyCache::signalParameterNames().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Returns the index of the signal method m.
Similar to QMetaMethod::methodIndex(), but non-signal methods are excluded.
Definition at line 950 of file qmetaobject.cpp.
References signalOffset().
Referenced by QQmlEngine::captureProperty(), QQmlPrivate::initObjectLookup(), QQmlPropertyData::load(), QQmlThreadNotifierProxyObject::qt_metacall(), QQmlPropertyPrivate::signalIndex(), and QQmlPropertyToPropertyBinding::update().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Returns the signal offset for the class m; i.e., the index position of the class's first signal.
Similar to QMetaObject::methodOffset(), but non-signal methods are excluded.
Definition at line 216 of file qmetaobject_p.h.
References Q_ASSERT, and signalCount.
Referenced by QSingleShotTimer::QSingleShotTimer(), QMetaObject::activate(), QObject::connect(), QObject::disconnect(), QObject::isSignalConnected(), signal(), QObjectPrivate::signalIndex(), and signalIndex().
Here is the caller graph for this function:| int QMetaObjectPrivate::classInfoCount |
Definition at line 186 of file qmetaobject_p.h.
Referenced by buildMetaObject(), QMetaObject::classInfo(), QMetaObject::classInfoCount(), QMetaObject::classInfoOffset(), and QMetaObject::indexOfClassInfo().
| int QMetaObjectPrivate::classInfoData |
Definition at line 186 of file qmetaobject_p.h.
Referenced by buildMetaObject(), QMetaObject::classInfo(), and QMetaObject::indexOfClassInfo().
| int QMetaObjectPrivate::className |
Definition at line 185 of file qmetaobject_p.h.
Referenced by buildMetaObject(), QMetaMethodInvoker::invokeImpl(), QMetaEnum::keysToValue(), QMetaEnum::keyToValue(), and objectClassName().
| int QMetaObjectPrivate::constructorCount |
Definition at line 190 of file qmetaobject_p.h.
Referenced by buildMetaObject(), QMetaObject::constructor(), QMetaObject::constructorCount(), and indexOfConstructor().
| int QMetaObjectPrivate::constructorData |
Definition at line 190 of file qmetaobject_p.h.
Referenced by buildMetaObject().
| int QMetaObjectPrivate::enumeratorCount |
Definition at line 189 of file qmetaobject_p.h.
Referenced by buildMetaObject(), QMetaObject::enumerator(), QMetaObject::enumeratorCount(), and QMetaObject::enumeratorOffset().
| int QMetaObjectPrivate::enumeratorData |
Definition at line 189 of file qmetaobject_p.h.
Referenced by buildMetaObject().
| int QMetaObjectPrivate::flags |
Definition at line 191 of file qmetaobject_p.h.
Referenced by buildMetaObject(), QV4::QQmlContextWrapper::getPropertyAndBase(), QMetaObject::indexOfProperty(), QV4::RegExp::match(), QMetaProperty::read(), QMetaProperty::readOnGadget(), QMetaProperty::reset(), QMetaProperty::resetOnGadget(), QMetaProperty::write(), QMetaProperty::writeOnGadget(), and QMetaProperty::writeOnGadget().
| int QMetaObjectPrivate::methodCount |
Definition at line 187 of file qmetaobject_p.h.
Referenced by buildMetaObject(), firstMethod(), indexOfMethodRelative(), QDBusMetaObject::inputTypesForMethod(), QMetaObject::method(), QMetaObject::methodCount(), QMetaObject::methodOffset(), originalClone(), QDBusMetaObject::outputTypesForMethod(), and QMetaMethod::revision().
| int QMetaObjectPrivate::methodData |
Definition at line 187 of file qmetaobject_p.h.
Referenced by buildMetaObject(), and QMetaMethod::revision().
| int QMetaObjectPrivate::propertyCount |
Definition at line 188 of file qmetaobject_p.h.
Referenced by buildMetaObject(), QMetaObject::property(), QMetaObject::propertyCount(), QDBusMetaObject::propertyMetaType(), and QMetaObject::propertyOffset().
| int QMetaObjectPrivate::propertyData |
Definition at line 188 of file qmetaobject_p.h.
Referenced by buildMetaObject().
| int QMetaObjectPrivate::revision |
Definition at line 184 of file qmetaobject_p.h.
Referenced by QMetaObjectBuilder::addMetaObject(), buildMetaObject(), QMetaObject::constructorCount(), QQmlPropertyCache::determineMetaObjectSizes(), QObject::disconnect(), QMetaObject::indexOfConstructor(), QMetaObject::indexOfMethod(), indexOfMethodRelative(), QMetaObject::indexOfSignal(), QMetaObject::indexOfSlot(), QMetaObject_findMetaObject(), rawStringData(), QQmlMetaType::registerSequentialContainer(), QMetaMethod::signature(), QMetaObject::static_metacall(), and stringDataView().
| int QMetaObjectPrivate::signalCount |
Definition at line 192 of file qmetaobject_p.h.
Referenced by absoluteSignalCount(), buildMetaObject(), indexOfMethodRelative(), metaObjectSignalCount(), signal(), and signalOffset().