Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qqmlmetatype.cpp File Reference
#include "qqmlmetatype_p.h"
#include <private/qqmlextensionplugin_p.h>
#include <private/qqmlmetatypedata_p.h>
#include <private/qqmlpropertycachecreator_p.h>
#include <private/qqmltype_p_p.h>
#include <private/qqmltypeloader_p.h>
#include <private/qqmltypemodule_p.h>
#include <private/qqmlvaluetype_p.h>
#include <private/qv4executablecompilationunit_p.h>
#include <QtCore/qcoreapplication.h>
#include <QtCore/qmutex.h>
#include <QtCore/qloggingcategory.h>
+ Include dependency graph for qqmlmetatype.cpp:

Go to the source code of this file.

Classes

struct  LockedData
 
struct  ModuleUri
 
class  QQmlMetaTypeDataPtr
 
class  QQmlMetaTypeRegistrationFailureRecorder
 

Functions

static QQmlTypePrivatecreateQQmlType (QQmlMetaTypeData *data, const QQmlPrivate::RegisterInterface &type)
 
static QQmlTypePrivatecreateQQmlType (QQmlMetaTypeData *data, const QString &elementName, const QQmlPrivate::RegisterSingletonType &type)
 
static QQmlTypePrivatecreateQQmlType (QQmlMetaTypeData *data, const QString &elementName, const QQmlPrivate::RegisterType &type)
 
static void addQQmlMetaTypeInterfaces (QQmlTypePrivate *priv, const QByteArray &className)
 
static QQmlTypePrivatecreateQQmlType (QQmlMetaTypeData *data, const QString &elementName, const QQmlPrivate::RegisterCompositeType &type)
 
static QQmlTypePrivatecreateQQmlType (QQmlMetaTypeData *data, const QString &elementName, const QQmlPrivate::RegisterCompositeSingletonType &type)
 
static QString registrationTypeString (QQmlType::RegistrationType typeType)
 
static bool checkRegistration (QQmlType::RegistrationType typeType, QQmlMetaTypeData *data, const char *uri, const QString &typeName, QTypeRevision version, QMetaType::TypeFlags flags)
 
static QQmlTypeModulegetTypeModule (const QHashedString &uri, QTypeRevision version, QQmlMetaTypeData *data)
 
static void addTypeToData (QQmlTypePrivate *type, QQmlMetaTypeData *data)
 
static QQmlType createTypeForUrl (QQmlMetaTypeData *data, const QUrl &url, const QHashedStringRef &qualifiedType, QQmlMetaType::CompositeTypeLookupMode mode, QList< QQmlError > *errors, QTypeRevision version)
 
static QQmlType doRegisterInlineComponentType (QQmlMetaTypeData *data, const QUrl &url)
 
static bool namespaceContainsRegistrations (const QQmlMetaTypeData *data, const QString &uri, QTypeRevision version)
 
static bool hasActiveInlineComponents (const QQmlMetaTypeData *data, const QQmlTypePrivate *d)
 
static bool isFullyTyped (const QQmlPrivate::CachedQmlUnit *unit)
 
static bool isInternalType (int idx)
 

Function Documentation

◆ addQQmlMetaTypeInterfaces()

static void addQQmlMetaTypeInterfaces ( QQmlTypePrivate priv,
const QByteArray className 
)
static

Definition at line 155 of file qqmlmetatype.cpp.

References className, QMetaType::id(), QMetaType::iface(), priv(), and ptr().

Referenced by createQQmlType(), createQQmlType(), createTypeForUrl(), and doRegisterInlineComponentType().

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

◆ addTypeToData()

static void addTypeToData ( QQmlTypePrivate type,
QQmlMetaTypeData data 
)
static

Definition at line 446 of file qqmlmetatype.cpp.

References QQmlTypeModule::add(), getTypeModule(), QMetaType::IsQmlList, Q_ASSERT, and QQmlType::SequentialContainerType.

Referenced by createTypeForUrl(), QQmlMetaType::registerCompositeSingletonType(), QQmlMetaType::registerCompositeType(), QQmlMetaType::registerSequentialContainer(), QQmlMetaType::registerSingletonType(), and QQmlMetaType::registerType().

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

◆ checkRegistration()

static bool checkRegistration ( QQmlType::RegistrationType  typeType,
QQmlMetaTypeData data,
const char *  uri,
const QString typeName,
QTypeRevision  version,
QMetaType::TypeFlags  flags 
)
static

Definition at line 385 of file qqmlmetatype.cpp.

References QString::arg(), arg, QString::fromUtf8(), QMetaType::IsGadget, QQmlTypeModule::lockLevel(), QTypeRevision::majorVersion(), QQmlTypeModule::Open, QMetaType::PointerToGadget, QMetaType::PointerToQObject, qCWarning, registrationTypeString(), QCoreApplication::translate(), and typeName.

Referenced by createTypeForUrl(), QQmlMetaType::registerCompositeSingletonType(), QQmlMetaType::registerCompositeType(), QQmlMetaType::registerSequentialContainer(), QQmlMetaType::registerSingletonType(), and QQmlMetaType::registerType().

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

◆ createQQmlType() [1/5]

static QQmlTypePrivate * createQQmlType ( QQmlMetaTypeData data,
const QQmlPrivate::RegisterInterface type 
)
static

Definition at line 60 of file qqmlmetatype.cpp.

References d, QString::fromUtf8(), and QQmlType::InterfaceType.

Referenced by QQmlMetaType::registerCompositeSingletonType(), QQmlMetaType::registerCompositeType(), QQmlMetaType::registerInterface(), QQmlMetaType::registerSingletonType(), and QQmlMetaType::registerType().

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

◆ createQQmlType() [2/5]

static QQmlTypePrivate * createQQmlType ( QQmlMetaTypeData data,
const QString elementName,
const QQmlPrivate::RegisterCompositeSingletonType type 
)
static

Definition at line 186 of file qqmlmetatype.cpp.

References addQQmlMetaTypeInterfaces(), QQmlType::CompositeSingletonType, QQmlPropertyCacheCreatorBase::createClassNameTypeByUrl(), d, QString::fromUtf8(), and QQmlTypeLoader::normalize().

+ Here is the call graph for this function:

◆ createQQmlType() [3/5]

static QQmlTypePrivate * createQQmlType ( QQmlMetaTypeData data,
const QString elementName,
const QQmlPrivate::RegisterCompositeType type 
)
static

Definition at line 171 of file qqmlmetatype.cpp.

References addQQmlMetaTypeInterfaces(), QQmlType::CompositeType, QQmlPropertyCacheCreatorBase::createClassNameTypeByUrl(), d, QString::fromUtf8(), and QQmlTypeLoader::normalize().

+ Here is the call graph for this function:

◆ createQQmlType() [4/5]

static QQmlTypePrivate * createQQmlType ( QQmlMetaTypeData data,
const QString elementName,
const QQmlPrivate::RegisterSingletonType type 
)
static

Definition at line 73 of file qqmlmetatype.cpp.

References d, QString::fromUtf8(), and QQmlType::SingletonType.

+ Here is the call graph for this function:

◆ createQQmlType() [5/5]

static QQmlTypePrivate * createQQmlType ( QQmlMetaTypeData data,
const QString elementName,
const QQmlPrivate::RegisterType type 
)
static

Definition at line 100 of file qqmlmetatype.cpp.

References QQmlType::CppType, QQmlPrivate::RegisterType::CreationMethod, d, QQmlPrivate::RegisterType::FinalizerCast, QString::fromUtf8(), QQmlPrivate::None, qstrcmp(), and QQmlPrivate::Structured.

+ Here is the call graph for this function:

◆ createTypeForUrl()

static QQmlType createTypeForUrl ( QQmlMetaTypeData data,
const QUrl url,
const QHashedStringRef qualifiedType,
QQmlMetaType::CompositeTypeLookupMode  mode,
QList< QQmlError > *  errors,
QTypeRevision  version 
)
static

Definition at line 586 of file qqmlmetatype.cpp.

References addQQmlMetaTypeInterfaces(), addTypeToData(), checkRegistration(), QQmlType::CompositeSingletonType, QQmlType::CompositeType, QHashedStringRef::constData(), QQmlPropertyCacheCreatorBase::createClassNameTypeByUrl(), dot(), error, QHashedStringRef::indexOf(), QHashedStringRef::length(), QList< T >::prepend(), priv(), qWarning, QQmlMetaType::Singleton, QHashedStringRef::toString(), typeName, and url.

Referenced by QQmlMetaType::findCompositeType(), and QQmlMetaType::typeForUrl().

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

◆ doRegisterInlineComponentType()

static QQmlType doRegisterInlineComponentType ( QQmlMetaTypeData data,
const QUrl url 
)
static

Definition at line 687 of file qqmlmetatype.cpp.

References addQQmlMetaTypeInterfaces(), className, QQmlPropertyCacheCreatorBase::createClassNameForInlineComponent(), QUrl::fragment(), QQmlType::InlineComponentType, priv(), and url.

Referenced by QQmlMetaType::findInlineComponentType(), and QQmlMetaType::inlineComponentTypeForUrl().

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

◆ getTypeModule()

static QQmlTypeModule * getTypeModule ( const QHashedString uri,
QTypeRevision  version,
QQmlMetaTypeData data 
)
static

Definition at line 437 of file qqmlmetatype.cpp.

References QTypeRevision::majorVersion().

Referenced by addTypeToData(), QQmlMetaType::registerModule(), and QQmlMetaType::typeId().

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

◆ hasActiveInlineComponents()

static bool hasActiveInlineComponents ( const QQmlMetaTypeData data,
const QQmlTypePrivate d 
)
static

Definition at line 1519 of file qqmlmetatype.cpp.

References QSet< T >::begin(), QQmlRefCount::count(), d, QQmlMetaType::equalBaseUrls(), and it.

Referenced by QQmlMetaType::freeUnusedTypesAndCaches().

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

◆ isFullyTyped()

static bool isFullyTyped ( const QQmlPrivate::CachedQmlUnit unit)
static

Definition at line 1644 of file qqmlmetatype.cpp.

References QQmlPrivate::CachedQmlUnit::aotCompiledFunctions, function, QV4::CompiledData::Unit::functionTableSize, and QQmlPrivate::CachedQmlUnit::qmlData.

Referenced by QQmlMetaType::findCachedCompilationUnit().

+ Here is the caller graph for this function:

◆ isInternalType()

static bool isInternalType ( int  idx)
static

Definition at line 1802 of file qqmlmetatype.cpp.

References QMetaType::QVariant, and QMetaType::UnknownType.

Referenced by QQmlMetaType::isValueType().

+ Here is the caller graph for this function:

◆ namespaceContainsRegistrations()

static bool namespaceContainsRegistrations ( const QQmlMetaTypeData data,
const QString uri,
QTypeRevision  version 
)
static

Definition at line 896 of file qqmlmetatype.cpp.

References QTypeRevision::majorVersion().

Referenced by QQmlMetaType::registerPluginTypes().

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

◆ registrationTypeString()

static QString registrationTypeString ( QQmlType::RegistrationType  typeType)
static

Definition at line 368 of file qqmlmetatype.cpp.

References QQmlType::CompositeSingletonType, QQmlType::CppType, QStringLiteral, QQmlType::SequentialContainerType, QQmlType::SingletonType, and typeStr().

Referenced by checkRegistration().

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