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

(23f983fa09aa378129ed34de8ab4c2ec95d18ab9)

#include "qmetaobject.h"
#include "qmetaobject_p.h"
#include "qmetatype.h"
#include "qmetatype_p.h"
#include "qobject.h"
#include "qobject_p.h"
#include <qcoreapplication.h>
#include <qvariant.h>
#include <qthread.h>
#include "private/qthread_p.h"
#include "private/qmetaobject_moc_p.h"
#include <ctype.h>
#include <memory>
+ Include dependency graph for qmetaobject.cpp:

Go to the source code of this file.

Macros

#define ASSERT_NOT_PRIMITIVE_TYPE(TYPE, METATYPEID, NAME)    Q_ASSERT(typeInfo != QMetaType::TYPE);
 

Enumerations

enum  { MaximumParamCount = 11 }
 

Functions

static const QMetaObjectPrivatepriv (const uint *data)
 
static const char * rawStringData (const QMetaObject *mo, int index)
 
static QByteArrayView stringDataView (const QMetaObject *mo, int index)
 
static QByteArray stringData (const QMetaObject *mo, int index)
 
static QByteArrayView typeNameFromTypeInfo (const QMetaObject *mo, uint typeInfo)
 
static int typeFromTypeInfo (const QMetaObject *mo, uint typeInfo)
 
static auto parse_scope (QByteArrayView qualifiedKey) noexcept
 
static QByteArrayView objectClassName (const QMetaObject *m)
 
static void argumentTypesFromString (const char *str, const char *end, QArgumentTypeArray &types)
 
static const QMetaObjectQMetaObject_findMetaObject (const QMetaObject *self, QByteArrayView name)
 
static void qRemoveWhitespace (const char *s, char *d)
 
static char * qNormalizeType (char *d, int &templdepth, QByteArray &result)
 
static Q_DECL_COLD_FUNCTION bool printMethodNotFoundWarning (const QMetaObject *meta, QByteArrayView name, qsizetype paramCount, const char *const *names, const QtPrivate::QMetaTypeInterface *const *metaTypes)
 
static bool isScopeMatch (QByteArrayView scope, const QMetaEnum *e)
 
static bool parseEnumFlags (QByteArrayView v, QVarLengthArray< QByteArrayView, 10 > &list)
 

Macro Definition Documentation

◆ ASSERT_NOT_PRIMITIVE_TYPE

#define ASSERT_NOT_PRIMITIVE_TYPE ( TYPE,
METATYPEID,
NAME )    Q_ASSERT(typeInfo != QMetaType::TYPE);

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
MaximumParamCount 

Definition at line 205 of file qmetaobject.cpp.

Function Documentation

◆ argumentTypesFromString()

static void argumentTypesFromString ( const char * str,
const char * end,
QArgumentTypeArray & types )
static

Definition at line 754 of file qmetaobject.cpp.

References begin(), Q_ASSERT, and str.

Referenced by QMetaObjectPrivate::decodeMethodSignature().

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

◆ isScopeMatch()

static bool isScopeMatch ( QByteArrayView scope,
const QMetaEnum * e )
static

Definition at line 3194 of file qmetaobject.cpp.

References QMetaObject::className(), className, QMetaEnum::enclosingMetaObject(), QMetaEnum::enumName(), qstrlen(), QByteArrayView::size(), QByteArrayView::sliced(), and QByteArrayView::startsWith().

Referenced by QMetaEnum::keysToValue(), and QMetaEnum::keyToValue().

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

◆ objectClassName()

static QByteArrayView objectClassName ( const QMetaObject * m)
inlinestatic

Definition at line 337 of file qmetaobject.cpp.

References priv(), and stringDataView().

Referenced by QMetaObject::className(), and QMetaObject_findMetaObject().

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

◆ parse_scope()

static auto parse_scope ( QByteArrayView qualifiedKey)
staticnoexcept

Definition at line 160 of file qmetaobject.cpp.

References R.

Referenced by QMetaEnum::keysToValue(), and QMetaEnum::keyToValue().

+ Here is the caller graph for this function:

◆ parseEnumFlags()

static bool parseEnumFlags ( QByteArrayView v,
QVarLengthArray< QByteArrayView, 10 > & list )
static

Definition at line 3269 of file qmetaobject.cpp.

References begin(), list, QList< T >::push_back(), qWarning, and sep.

Referenced by QMetaEnum::keysToValue().

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

◆ printMethodNotFoundWarning()

static Q_DECL_COLD_FUNCTION bool printMethodNotFoundWarning ( const QMetaObject * meta,
QByteArrayView name,
qsizetype paramCount,
const char *const * names,
const QtPrivate::QMetaTypeInterface *const * metaTypes )
inlinestatic

Definition at line 1395 of file qmetaobject.cpp.

References QMetaObject::className(), i, QMetaObject::method(), method, QMetaObject::methodCount(), qstrlen(), and qWarning.

+ Here is the call graph for this function:

◆ priv()

static const QMetaObjectPrivate * priv ( const uint * data)
inlinestatic

Definition at line 120 of file qmetaobject.cpp.

Referenced by BindingFixer::BindingFixer(), BindingFixer::~BindingFixer(), QQuickImagePreviewProvider::~QQuickImagePreviewProvider(), QMetaObjectPrivate::absoluteSignalCount(), addQQmlMetaTypeInterfaces(), QTextHtmlParserNode::applyForegroundImage(), QQmlAnyBinding::asUntypedPropertyBinding(), QDBusConnection::asyncCall(), QTextFrame::begin(), QTextCursorPrivate::block(), QTextCursor::charFormat(), QMetaObject::classInfo(), QMetaObject::classInfoCount(), QMetaObject::classInfoOffset(), QQuickDeliveryAgentPrivate::clearFocusInScope(), QTextDocument::clone(), QQmlNotifierEndpoint::connect(), QMetaObject::constructor(), QMetaObject::constructorCount(), QHttpNetworkConnectionPrivate::copyCredentials(), QHttpNetworkConnectionPrivate::createAuthorization(), QNetworkAccessManager::createRequest(), createTypeForUrl(), QPropertyBindingPrivate::destroyAndFreeMemory(), QQmlPropertyCache::determineMetaObjectSizes(), QQmlNotifierEndpoint::disconnect(), QLowEnergyControllerPrivateBluezDBus::discoverServices(), QRegularExpressionPrivate::doMatch(), doRegisterInlineComponentType(), QCtfLibImpl::doTracepoint(), QTextFrame::end(), QHttpNetworkConnectionChannel::ensureConnection(), QQuickLayout::ensureLayoutItemsUpdated(), QMetaObject::enumerator(), QMetaObject::enumeratorCount(), QMetaObject::enumeratorOffset(), QQmlObjectCreator::finalize(), QMetaObjectPrivate::firstMethod(), fromLayoutItemRect(), fromLayoutItemSize(), gc(), gcDone(), QQmlData::get(), QQmlData::get(), getText(), QRegularExpression::globalMatch(), QRegularExpression::globalMatchView(), QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(), hasFeature(), QMetaObject::indexOfClassInfo(), QMetaObject::indexOfConstructor(), QMetaObjectPrivate::indexOfConstructor(), QMetaObjectPrivate::indexOfEnumerator(), QMetaObject::indexOfMethod(), QMetaObjectPrivate::indexOfMethodRelative(), QMetaObject::indexOfProperty(), QMetaObject::indexOfSignal(), QMetaObject::indexOfSlot(), QCtfLibImpl::initializeTracepoint(), QWidget::inputMethodHints(), QDBusMetaObject::inputTypesForMethod(), QMetaMethodInvoker::invokeImpl(), QV4::RegExp::match(), QRegularExpression::match(), QRegularExpression::matchView(), QTextDocumentPrivate::mergeCachedResources(), QMetaEnum::metaType(), QMetaObject::metaType(), QMetaObject::method(), QMetaObject::methodCount(), QMetaObjectPrivate::methodMatch(), QMetaObject::methodOffset(), objectClassName(), QNearFieldManagerPrivateImpl::onCardInserted(), QTextFrame::iterator::operator++(), QTextFrame::iterator::operator--(), QDBusMetaObject::outputTypesForMethod(), QMetaMethod::parameterMetaType(), QMetaObject::property(), QMetaObject::propertyCount(), QDBusMetaObject::propertyMetaType(), QMetaObject::propertyOffset(), QNetworkAccessManagerPrivate::proxyAuthenticationRequired(), QMetaObject_findMetaObject(), qt_get_metadata(), rawStringData(), QMetaProperty::read(), QMetaProperty::readOnGadget(), QQmlMetaType::registerCompositeSingletonType(), QQmlMetaType::registerCompositeType(), QQmlMetaType::registerInterface(), QQuickImagePreviewProvider::registerPreview(), QQmlMetaType::registerSequentialContainer(), QQmlMetaType::registerSingletonType(), QQmlMetaType::registerType(), QQmlMetaTypeData::registerType(), QQmlMetaType::registerTypeAlias(), QQuickImagePreviewProvider::requestImage(), QMetaProperty::reset(), QMetaProperty::resetOnGadget(), QAbstractSocketPrivate::resumeSocketNotifiers(), QMetaMethod::revision(), setBlockCharFormatHelper(), QQuickDeliveryAgentPrivate::setFocusInScope(), QMetaObjectPrivate::signal(), QMetaMethod::signature(), QHttpSocketEngine::slotSocketConnected(), QHttpSocketEngine::slotSocketReadNotification(), QTabBarPrivate::Tab::startAnimation(), QMetaObject::static_metacall(), stringDataView(), toLayoutItemRect(), toLayoutItemSize(), QV4::SequencePrototype::toVariant(), QCtfLibImpl::tracepointEnabled(), QQuickMultiEffectPrivate::updateBlurItemsAmount(), QWidgetPrivate::updateBrushOrigin(), QQmlData::wasDeleted(), QQmlData::wasDeleted(), QMetaProperty::write(), QMetaProperty::writeOnGadget(), and QMetaProperty::writeOnGadget().

◆ QMetaObject_findMetaObject()

static const QMetaObject * QMetaObject_findMetaObject ( const QMetaObject * self,
QByteArrayView name )
static

Definition at line 1035 of file qmetaobject.cpp.

References QArrayDataPointer< T >::data(), objectClassName(), priv(), Q_ASSERT, and QMetaObject_findMetaObject().

Referenced by QMetaObject_findMetaObject().

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

◆ qNormalizeType()

static char * qNormalizeType ( char * d,
int & templdepth,
QByteArray & result )
static

Definition at line 1314 of file qmetaobject.cpp.

References d.

Referenced by QMetaObject::normalizedSignature().

+ Here is the caller graph for this function:

◆ qRemoveWhitespace()

static void qRemoveWhitespace ( const char * s,
char * d )
static

Definition at line 1296 of file qmetaobject.cpp.

References d, is_ident_char(), and is_space().

Referenced by QMetaObject::normalizedSignature().

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

◆ rawStringData()

static const char * rawStringData ( const QMetaObject * mo,
int index )
inlinestatic

Definition at line 123 of file qmetaobject.cpp.

References mo, priv(), and Q_ASSERT.

Referenced by QMetaEnum::enumName(), QMetaObject::indexOfClassInfo(), QMetaObject::indexOfProperty(), QMetaEnum::key(), QMetaEnum::name(), QMetaProperty::name(), QMetaClassInfo::name(), typeFromTypeInfo(), QMetaClassInfo::value(), and QMetaEnum::valueToKey().

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

◆ stringData()

static QByteArray stringData ( const QMetaObject * mo,
int index )
inlinestatic

Definition at line 139 of file qmetaobject.cpp.

References QByteArray::fromRawData(), mo, stringDataView(), and view.

Referenced by QQmlPropertyCache::addToHash(), StringOrTranslation::asString(), QMetaObjectPrivate::methodMatch(), QMetaProperty::notifySignalIndex(), QV4::Compiler::StringTableGenerator::serialize(), StringOrTranslation::setString(), and StringOrTranslation::toString().

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

◆ stringDataView()

static QByteArrayView stringDataView ( const QMetaObject * mo,
int index )
inlinestatic

Definition at line 130 of file qmetaobject.cpp.

References mo, priv(), and Q_ASSERT.

Referenced by QMetaObjectPrivate::indexOfEnumerator(), QMetaMethodInvoker::invokeImpl(), QMetaEnum::keysToValue(), QMetaEnum::keyToValue(), objectClassName(), stringData(), typeNameFromTypeInfo(), and QMetaEnum::valueToKeys().

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

◆ typeFromTypeInfo()

static int typeFromTypeInfo ( const QMetaObject * mo,
uint typeInfo )
inlinestatic

Definition at line 153 of file qmetaobject.cpp.

References QMetaType::fromName(), IsUnresolvedType, mo, rawStringData(), and TypeNameIndexMask.

Referenced by QMetaObjectPrivate::checkConnectArgs(), and QMetaObjectPrivate::methodMatch().

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

◆ typeNameFromTypeInfo()

static QByteArrayView typeNameFromTypeInfo ( const QMetaObject * mo,
uint typeInfo )
inlinestatic

Definition at line 145 of file qmetaobject.cpp.

References IsUnresolvedType, mo, stringDataView(), and TypeNameIndexMask.

Referenced by QMetaObjectPrivate::checkConnectArgs(), QMetaObjectPrivate::methodMatch(), and QMetaProperty::typeName().

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