Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qmetaobject.cpp File Reference
#include "qmetaobject.h"
#include "qmetatype.h"
#include "qobject.h"
#include "qmetaobject_p.h"
#include "qmetatype_p.h"
#include <qcoreapplication.h>
#include <qcoreevent.h>
#include <qdatastream.h>
#include <qstringlist.h>
#include <qthread.h>
#include <qvariant.h>
#include <qdebug.h>
#include "private/qobject_p.h"
#include "private/qmetaobject_p.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 QLatin1StringView stringDataView (const QMetaObject *mo, int index)
 
static QByteArray stringData (const QMetaObject *mo, int index)
 
static const char * rawTypeNameFromTypeInfo (const QMetaObject *mo, uint typeInfo)
 
static QByteArray typeNameFromTypeInfo (const QMetaObject *mo, uint typeInfo)
 
static int typeFromTypeInfo (const QMetaObject *mo, uint typeInfo)
 
static const char * objectClassName (const QMetaObject *m)
 
static void argumentTypesFromString (const char *str, const char *end, QArgumentTypeArray &types)
 
static const QMetaObjectQMetaObject_findMetaObject (const QMetaObject *self, const char *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, QLatin1StringView name, qsizetype paramCount, const char *const *names, const QtPrivate::QMetaTypeInterface *const *metaTypes)
 
static auto parse_scope (QLatin1StringView qualifiedKey) noexcept
 

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, QByteArray::replace(), and str.

Referenced by QMetaObjectPrivate::decodeMethodSignature().

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

◆ objectClassName()

static const char * objectClassName ( const QMetaObject m)
inlinestatic

Definition at line 337 of file qmetaobject.cpp.

References QMetaObjectPrivate::className, priv(), and rawStringData().

Referenced by QMetaObject::className(), QMetaObjectPrivate::indexOfSignalRelative(), QMetaProperty::notifySignalIndex(), QMetaObject_findMetaObject(), QMetaEnum::scope(), and QMetaObject::tr().

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

◆ parse_scope()

static auto parse_scope ( QLatin1StringView  qualifiedKey)
staticnoexcept

Definition at line 3209 of file qmetaobject.cpp.

References R.

Referenced by QMetaEnum::keysToValue().

+ Here is the caller graph for this function:

◆ printMethodNotFoundWarning()

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

◆ priv()

static const QMetaObjectPrivate * priv ( const uint data)
inlinestatic

Definition at line 123 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(), QQmlData::get(), QQmlData::get(), getText(), QRegularExpression::globalMatch(), QRegularExpression::globalMatchView(), QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(), hasFeature(), QMetaObject::indexOfClassInfo(), QMetaObject::indexOfConstructor(), QMetaObjectPrivate::indexOfConstructor(), QMetaObject::indexOfEnumerator(), QMetaObject::indexOfMethod(), QMetaObjectPrivate::indexOfMethodRelative(), QMetaObject::indexOfProperty(), QMetaObject::indexOfSignal(), QMetaObject::indexOfSlot(), QCtfLibImpl::initializeTracepoint(), QWidget::inputMethodHints(), QDBusMetaObject::inputTypesForMethod(), QMetaMethodInvoker::invokeImpl(), QMetaEnum::keysToValue(), QMetaEnum::keyToValue(), 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(), 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,
const char *  name 
)
static

Definition at line 1035 of file qmetaobject.cpp.

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

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 1313 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 1295 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 126 of file qmetaobject.cpp.

References mo, priv(), Q_ASSERT, and QMetaObjectPrivate::revision.

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

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

◆ rawTypeNameFromTypeInfo()

static const char * rawTypeNameFromTypeInfo ( const QMetaObject mo,
uint  typeInfo 
)
inlinestatic

Definition at line 148 of file qmetaobject.cpp.

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

Referenced by QMetaProperty::typeName().

+ 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 142 of file qmetaobject.cpp.

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

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

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

◆ stringDataView()

static QLatin1StringView stringDataView ( const QMetaObject mo,
int  index 
)
inlinestatic

Definition at line 133 of file qmetaobject.cpp.

References mo, priv(), Q_ASSERT, and QMetaObjectPrivate::revision.

Referenced by QMetaMethodInvoker::invokeImpl(), QMetaEnum::keysToValue(), stringData(), 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 166 of file qmetaobject.cpp.

References QMetaType::fromName(), QMetaType::id(), 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 QByteArray typeNameFromTypeInfo ( const QMetaObject mo,
uint  typeInfo 
)
inlinestatic

Definition at line 157 of file qmetaobject.cpp.

References IsUnresolvedType, mo, QMetaType::name(), stringData(), 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: