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

(19b09affee8698f80d386e3b286753974f6bf10a)

#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, const QQmlType::SingletonInstanceInfo::ConstPtr &siinfo)
 
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, const QQmlType::SingletonInstanceInfo::ConstPtr &siinfo)
 
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 int doCountInternalCompositeTypeSelfReferences (QQmlMetaTypeData *data, const QQmlRefPointer< QV4::CompiledData::CompilationUnit > &compilationUnit)
 
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 152 of file qqmlmetatype.cpp.

References className, priv(), ptr(), and Q_ASSERT.

Referenced by 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 445 of file qqmlmetatype.cpp.

References QMetaType::IsQmlList, Q_ASSERT, and QQmlType::SequentialContainerType.

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

+ 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 384 of file qqmlmetatype.cpp.

References QString::arg(), arg, QString::fromUtf8(), QMetaType::IsGadget, 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,
const QQmlType::SingletonInstanceInfo::ConstPtr & siinfo )
static

Definition at line 184 of file qqmlmetatype.cpp.

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

+ 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 169 of file qqmlmetatype.cpp.

References QQmlType::CompositeType, 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,
const QQmlType::SingletonInstanceInfo::ConstPtr & siinfo )
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 97 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 589 of file qqmlmetatype.cpp.

References addQQmlMetaTypeInterfaces(), addTypeToData(), QQmlRefPointer< const SingletonInstanceInfo >::Adopt, checkRegistration(), QQmlType::CompositeSingletonType, QQmlType::CompositeType, QHashedStringRef::constData(), QQmlType::SingletonInstanceInfo::create(), QQmlPropertyCacheCreatorBase::createClassNameTypeByUrl(), dot(), error, QHashedStringRef::indexOf(), QHashedStringRef::length(), 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:

◆ doCountInternalCompositeTypeSelfReferences()

static int doCountInternalCompositeTypeSelfReferences ( QQmlMetaTypeData * data,
const QQmlRefPointer< QV4::CompiledData::CompilationUnit > & compilationUnit )
static

Definition at line 1550 of file qqmlmetatype.cpp.

References QSet< T >::constEnd(), QSet< T >::constFind(), and it.

Referenced by QQmlMetaType::countInternalCompositeTypeSelfReferences(), and QQmlMetaType::freeUnusedTypesAndCaches().

+ 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 698 of file qqmlmetatype.cpp.

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

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

+ 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 436 of file qqmlmetatype.cpp.

References QTypeRevision::majorVersion().

+ Here is the call graph for this function:

◆ hasActiveInlineComponents()

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

Definition at line 1536 of file qqmlmetatype.cpp.

References QSet< T >::begin(), 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 1696 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 1854 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 907 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 367 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: