Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QQmlMetaType Class Reference

#include <qqmlmetatype_p.h>

+ Collaboration diagram for QQmlMetaType:

Public Types

enum class  RegistrationResult { Success , Failure , NoRegistrationFunction }
 
enum  CompositeTypeLookupMode { NonSingleton , Singleton }
 
enum class  CachedUnitLookupError { NoError , NoUnitFound , VersionMismatch , NotFullyTyped }
 
enum  CacheMode { RejectAll , AcceptUntyped , RequireFullyTyped }
 
enum  ClonePolicy { CloneAll , CloneEnumsOnly }
 

Static Public Member Functions

static QUrl inlineComponentUrl (const QUrl &baseUrl, const QString &name)
 
static bool equalBaseUrls (const QUrl &aUrl, const QUrl &bUrl)
 
static QQmlType findCompositeType (const QUrl &url, const QQmlRefPointer< QV4::ExecutableCompilationUnit > &compilationUnit, CompositeTypeLookupMode mode=NonSingleton)
 
static QQmlType findInlineComponentType (const QUrl &url, const QQmlRefPointer< QV4::ExecutableCompilationUnit > &compilationUnit)
 
static QQmlType findInlineComponentType (const QUrl &baseUrl, const QString &name, const QQmlRefPointer< QV4::ExecutableCompilationUnit > &compilationUnit)
 
static void unregisterInternalCompositeType (QMetaType metaType, QMetaType listMetaType)
 
static QQmlType registerType (const QQmlPrivate::RegisterType &type)
 
static QQmlType registerInterface (const QQmlPrivate::RegisterInterface &type)
 
static QQmlType registerSingletonType (const QQmlPrivate::RegisterSingletonType &type)
 
static QQmlType registerCompositeSingletonType (const QQmlPrivate::RegisterCompositeSingletonType &type)
 
static QQmlType registerCompositeType (const QQmlPrivate::RegisterCompositeType &type)
 
static RegistrationResult registerPluginTypes (QObject *instance, const QString &basePath, const QString &uri, const QString &typeNamespace, QTypeRevision version, QList< QQmlError > *errors)
 
static QQmlType typeForUrl (const QString &urlString, const QHashedStringRef &typeName, CompositeTypeLookupMode mode, QList< QQmlError > *errors, QTypeRevision version=QTypeRevision())
 
static QQmlType inlineComponentTypeForUrl (const QUrl &url)
 
static QQmlType inlineComponentTypeForUrl (const QUrl &baseUrl, const QString &name)
 
static void unregisterType (int type)
 
static void registerMetaObjectForType (const QMetaObject *metaobject, QQmlTypePrivate *type)
 
static void registerModule (const char *uri, QTypeRevision version)
 
static bool protectModule (const QString &uri, QTypeRevision version, bool weakProtectAllVersions=false)
 
static void registerModuleImport (const QString &uri, QTypeRevision version, const QQmlDirParser::Import &import)
 
static void unregisterModuleImport (const QString &uri, QTypeRevision version, const QQmlDirParser::Import &import)
 
static QList< QQmlDirParser::ImportmoduleImports (const QString &uri, QTypeRevision version)
 
static int typeId (const char *uri, QTypeRevision version, const char *qmlName)
 
static void registerUndeletableType (const QQmlType &dtype)
 
static QList< QStringqmlTypeNames ()
 Returns the list of registered QML type names.
 
static QList< QQmlTypeqmlTypes ()
 Returns the list of registered QML types.
 
static QList< QQmlTypeqmlSingletonTypes ()
 Returns the list of registered QML singleton types.
 
static QList< QQmlTypeqmlAllTypes ()
 Returns the list of all registered types.
 
static QQmlType qmlType (const QString &qualifiedName, QTypeRevision version)
 Returns the type (if any) of URI-qualified named qualifiedName and version specified by version_major and version_minor.
 
static QQmlType qmlType (const QHashedStringRef &name, const QHashedStringRef &module, QTypeRevision version)
 
static QQmlType qmlType (const QMetaObject *)
 Returns the type (if any) that corresponds to the metaObject.
 
static QQmlType qmlType (const QMetaObject *metaObject, const QHashedStringRef &module, QTypeRevision version)
 Returns the type (if any) that corresponds to the metaObject in version specified by version_major and version_minor in module specified by uri.
 
static QQmlType qmlTypeById (int qmlTypeId)
 Returns the type (if any) that corresponds to qmlTypeId.
 
static QQmlType qmlType (QMetaType metaType)
 Returns the type (if any) that corresponds to metaType.
 
static QQmlType qmlListType (QMetaType metaType)
 
static QQmlType qmlType (const QUrl &unNormalizedUrl, bool includeNonFileImports=false)
 Returns the type (if any) that corresponds to the given url in the set of composite types added through file imports.
 
static QQmlPropertyCache::ConstPtr propertyCache (QObject *object, QTypeRevision version=QTypeRevision())
 Returns a QQmlPropertyCache for obj if one is available.
 
static QQmlPropertyCache::ConstPtr propertyCache (const QMetaObject *metaObject, QTypeRevision version=QTypeRevision())
 
static QQmlPropertyCache::ConstPtr propertyCache (const QQmlType &type, QTypeRevision version)
 
static QQmlMetaObject rawMetaObjectForType (QMetaType metaType)
 
static QQmlMetaObject metaObjectForType (QMetaType metaType)
 
static QQmlPropertyCache::ConstPtr propertyCacheForType (QMetaType metaType)
 
static QQmlPropertyCache::ConstPtr rawPropertyCacheForType (QMetaType metaType)
 
static QQmlPropertyCache::ConstPtr rawPropertyCacheForType (QMetaType metaType, QTypeRevision version)
 
static void freeUnusedTypesAndCaches ()
 
static QMetaProperty defaultProperty (const QMetaObject *)
 
static QMetaProperty defaultProperty (QObject *)
 
static QMetaMethod defaultMethod (const QMetaObject *)
 
static QMetaMethod defaultMethod (QObject *)
 
static QObjecttoQObject (const QVariant &, bool *ok=nullptr)
 
static QMetaType listValueType (QMetaType type)
 
static QQmlAttachedPropertiesFunc attachedPropertiesFunc (QQmlEnginePrivate *, const QMetaObject *)
 
static bool isInterface (QMetaType type)
 See qmlRegisterInterface() for information about when this will return true.
 
static const char * interfaceIId (QMetaType type)
 
static bool isList (QMetaType type)
 
static QTypeRevision latestModuleVersion (const QString &uri)
 
static bool isStronglyLockedModule (const QString &uri, QTypeRevision version)
 
static QTypeRevision matchingModuleVersion (const QString &module, QTypeRevision version)
 
static QQmlTypeModuletypeModule (const QString &uri, QTypeRevision version)
 
static QList< QQmlPrivate::AutoParentFunctionparentFunctions ()
 
static const QQmlPrivate::CachedQmlUnitfindCachedCompilationUnit (const QUrl &uri, CacheMode mode, CachedUnitLookupError *status)
 
static void prependCachedUnitLookupFunction (QQmlPrivate::QmlUnitCacheLookupFunction handler)
 
static void removeCachedUnitLookupFunction (QQmlPrivate::QmlUnitCacheLookupFunction handler)
 
static QString prettyTypeName (const QObject *object)
 Returns the pretty QML type name (e.g.
 
template<typename QQmlTypeContainer >
static void removeQQmlTypePrivate (QQmlTypeContainer &container, const QQmlTypePrivate *reference)
 
template<typename InlineComponentContainer >
static void removeFromInlineComponents (InlineComponentContainer &container, const QQmlTypePrivate *reference)
 
static void registerTypeAlias (int typeId, const QString &name)
 
static int registerAutoParentFunction (const QQmlPrivate::RegisterAutoParent &autoparent)
 
static void unregisterAutoParentFunction (const QQmlPrivate::AutoParentFunction &function)
 
static QQmlType registerSequentialContainer (const QQmlPrivate::RegisterSequentialContainer &sequenceRegistration)
 
static void unregisterSequentialContainer (int id)
 
static int registerUnitCacheHook (const QQmlPrivate::RegisterQmlUnitCacheHook &hookRegistration)
 
static void clearTypeRegistrations ()
 
static QList< QQmlProxyMetaObject::ProxyDataproxyData (const QMetaObject *mo, const QMetaObject *baseMetaObject, QMetaObject *lastMetaObject)
 
static void clone (QMetaObjectBuilder &builder, const QMetaObject *mo, const QMetaObject *ignoreStart, const QMetaObject *ignoreEnd, ClonePolicy policy)
 
static void qmlInsertModuleRegistration (const QString &uri, void(*registerFunction)())
 
static void qmlRemoveModuleRegistration (const QString &uri)
 
static bool qmlRegisterModuleTypes (const QString &uri)
 
static bool isValueType (QMetaType type)
 
static QQmlValueTypevalueType (QMetaType metaType)
 
static const QMetaObjectmetaObjectForValueType (QMetaType type)
 
static const QMetaObjectmetaObjectForValueType (const QQmlType &qmlType)
 
static QQmlPropertyCache::ConstPtr findPropertyCacheInCompositeTypes (QMetaType t)
 
static void registerInternalCompositeType (const QQmlRefPointer< QV4::ExecutableCompilationUnit > &compilationUnit)
 
static void unregisterInternalCompositeType (const QQmlRefPointer< QV4::ExecutableCompilationUnit > &compilationUnit)
 
static int countInternalCompositeTypeSelfReferences (const QQmlRefPointer< QV4::ExecutableCompilationUnit > &compilationUnit)
 
static QQmlRefPointer< QV4::ExecutableCompilationUnitobtainExecutableCompilationUnit (QMetaType type)
 

Friends

class QQmlDesignerMetaObject
 

Detailed Description

Definition at line 33 of file qqmlmetatype_p.h.

Member Enumeration Documentation

◆ CachedUnitLookupError

Enumerator
NoError 
NoUnitFound 
VersionMismatch 
NotFullyTyped 

Definition at line 172 of file qqmlmetatype_p.h.

◆ CacheMode

Enumerator
RejectAll 
AcceptUntyped 
RequireFullyTyped 

Definition at line 179 of file qqmlmetatype_p.h.

◆ ClonePolicy

Enumerator
CloneAll 
CloneEnumsOnly 

Definition at line 230 of file qqmlmetatype_p.h.

◆ CompositeTypeLookupMode

Enumerator
NonSingleton 
Singleton 

Definition at line 64 of file qqmlmetatype_p.h.

◆ RegistrationResult

Enumerator
Success 
Failure 
NoRegistrationFunction 

Definition at line 39 of file qqmlmetatype_p.h.

Member Function Documentation

◆ attachedPropertiesFunc()

QQmlAttachedPropertiesFunc QQmlMetaType::attachedPropertiesFunc ( QQmlEnginePrivate engine,
const QMetaObject mo 
)
static

Definition at line 1144 of file qqmlmetatype.cpp.

References engine, and mo.

Referenced by qmlAttachedPropertiesFunction().

+ Here is the caller graph for this function:

◆ clearTypeRegistrations()

void QQmlMetaType::clearTypeRegistrations ( )
static

Definition at line 302 of file qqmlmetatype.cpp.

References QHash< Key, T >::swap().

Referenced by qmlClearTypeRegistrations().

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

◆ clone()

void QQmlMetaType::clone ( QMetaObjectBuilder builder,
const QMetaObject mo,
const QMetaObject ignoreStart,
const QMetaObject ignoreEnd,
QQmlMetaType::ClonePolicy  policy 
)
static

◆ countInternalCompositeTypeSelfReferences()

int QQmlMetaType::countInternalCompositeTypeSelfReferences ( const QQmlRefPointer< QV4::ExecutableCompilationUnit > &  compilationUnit)
static

Definition at line 1922 of file qqmlmetatype.cpp.

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

Referenced by QQmlTypeLoader::trimCache().

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

◆ defaultMethod() [1/2]

QMetaMethod QQmlMetaType::defaultMethod ( const QMetaObject metaObject)
static

Definition at line 1179 of file qqmlmetatype.cpp.

References info, and metaObject().

Referenced by defaultMethod().

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

◆ defaultMethod() [2/2]

QMetaMethod QQmlMetaType::defaultMethod ( QObject obj)
static

Definition at line 1196 of file qqmlmetatype.cpp.

References defaultMethod(), and metaObject().

+ Here is the call graph for this function:

◆ defaultProperty() [1/2]

QMetaProperty QQmlMetaType::defaultProperty ( const QMetaObject metaObject)
static

Definition at line 1153 of file qqmlmetatype.cpp.

References info, and metaObject().

Referenced by defaultProperty(), and QQmlPropertyPrivate::initDefault().

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

◆ defaultProperty() [2/2]

QMetaProperty QQmlMetaType::defaultProperty ( QObject obj)
static

Definition at line 1170 of file qqmlmetatype.cpp.

References defaultProperty(), and metaObject().

+ Here is the call graph for this function:

◆ equalBaseUrls()

static bool QQmlMetaType::equalBaseUrls ( const QUrl aUrl,
const QUrl bUrl 
)
inlinestatic

Definition at line 52 of file qqmlmetatype_p.h.

References QUrl::host(), QUrl::password(), QUrl::path(), QUrl::port(), QUrl::query(), QUrl::scheme(), and QUrl::userName().

Referenced by icutils::containedInSameType(), QQmlTypeData::done(), and hasActiveInlineComponents().

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

◆ findCachedCompilationUnit()

const QQmlPrivate::CachedQmlUnit * QQmlMetaType::findCachedCompilationUnit ( const QUrl uri,
QQmlMetaType::CacheMode  mode,
CachedUnitLookupError status 
)
static

Definition at line 1657 of file qqmlmetatype.cpp.

References error, isFullyTyped(), NoError, NotFullyTyped, NoUnitFound, Q_ASSERT, qCDebug, RejectAll, RequireFullyTyped, QV4::ExecutableCompilationUnit::verifyHeader(), and VersionMismatch.

Referenced by QV4::ExecutionEngine::compileModule(), QV4::Script::createFromFileOrCache(), QQmlTypeLoader::getScript(), and QQmlTypeLoader::getType().

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

◆ findCompositeType()

QQmlType QQmlMetaType::findCompositeType ( const QUrl url,
const QQmlRefPointer< QV4::ExecutableCompilationUnit > &  compilationUnit,
CompositeTypeLookupMode  mode = NonSingleton 
)
static

Definition at line 657 of file qqmlmetatype.cpp.

References createTypeForUrl(), QQmlTypeLoader::normalize(), and url.

Referenced by QQmlTypeData::done(), and QV4::ExecutableCompilationUnit::finalizeCompositeType().

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

◆ findInlineComponentType() [1/2]

static QQmlType QQmlMetaType::findInlineComponentType ( const QUrl baseUrl,
const QString name,
const QQmlRefPointer< QV4::ExecutableCompilationUnit > &  compilationUnit 
)
inlinestatic

Definition at line 74 of file qqmlmetatype_p.h.

References baseUrl.

◆ findInlineComponentType() [2/2]

QQmlType QQmlMetaType::findInlineComponentType ( const QUrl url,
const QQmlRefPointer< QV4::ExecutableCompilationUnit > &  compilationUnit 
)
static

Definition at line 706 of file qqmlmetatype.cpp.

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

+ Here is the call graph for this function:

◆ findPropertyCacheInCompositeTypes()

QQmlPropertyCache::ConstPtr QQmlMetaType::findPropertyCacheInCompositeTypes ( QMetaType  t)
static

Definition at line 1880 of file qqmlmetatype.cpp.

Referenced by qmlobject_can_qml_cast(), and rawPropertyCacheForType().

+ Here is the caller graph for this function:

◆ freeUnusedTypesAndCaches()

void QQmlMetaType::freeUnusedTypesAndCaches ( )
static

Definition at line 1533 of file qqmlmetatype.cpp.

References QSet< T >::begin(), QQmlType::CompositeSingletonType, QQmlType::CompositeType, d, QSet< T >::end(), QSet< T >::erase(), hasActiveInlineComponents(), it, removeFromInlineComponents(), and removeQQmlTypePrivate().

Referenced by QJSEnginePrivate::~QJSEnginePrivate(), QQmlEnginePrivate::~QQmlEnginePrivate(), QQmlTypeLoader::clearCache(), and QQmlTypeLoader::trimCache().

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

◆ inlineComponentTypeForUrl() [1/2]

static QQmlType QQmlMetaType::inlineComponentTypeForUrl ( const QUrl baseUrl,
const QString name 
)
inlinestatic

Definition at line 95 of file qqmlmetatype_p.h.

References baseUrl.

◆ inlineComponentTypeForUrl() [2/2]

QQmlType QQmlMetaType::inlineComponentTypeForUrl ( const QUrl url)
static

Definition at line 1352 of file qqmlmetatype.cpp.

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

Referenced by QQmlPropertyCacheCreator< ObjectContainer >::createMetaObject(), and QQmlImportInstance::resolveType().

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

◆ inlineComponentUrl()

static QUrl QQmlMetaType::inlineComponentUrl ( const QUrl baseUrl,
const QString name 
)
inlinestatic

Definition at line 45 of file qqmlmetatype_p.h.

References baseUrl, and QUrl::setFragment().

+ Here is the call graph for this function:

◆ interfaceIId()

const char * QQmlMetaType::interfaceIId ( QMetaType  type)
static

Definition at line 1214 of file qqmlmetatype.cpp.

References QMetaType::id().

Referenced by QQmlPropertyPrivate::write().

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

◆ isInterface()

bool QQmlMetaType::isInterface ( QMetaType  type)
static

See qmlRegisterInterface() for information about when this will return true.

Definition at line 1208 of file qqmlmetatype.cpp.

Referenced by QQmlPropertyPrivate::write().

+ Here is the caller graph for this function:

◆ isList()

bool QQmlMetaType::isList ( QMetaType  type)
static

Definition at line 1221 of file qqmlmetatype.cpp.

References QMetaType::IsQmlList.

Referenced by allSubObjects(), and listValueType().

+ Here is the caller graph for this function:

◆ isStronglyLockedModule()

bool QQmlMetaType::isStronglyLockedModule ( const QString uri,
QTypeRevision  version 
)
static

Definition at line 1053 of file qqmlmetatype.cpp.

References QQmlTypeModule::Strong.

◆ isValueType()

bool QQmlMetaType::isValueType ( QMetaType  type)
static

Definition at line 1821 of file qqmlmetatype.cpp.

References isInternalType(), and valueType().

Referenced by QQmlPropertyCacheCreator< ObjectContainer >::buildMetaObjectRecursively(), QQuickPropertyAnimationPrivate::convertVariant(), QQmlPropertyPrivate::initProperty(), QV4::loadProperty(), and QQmlPropertyPrivate::propertyTypeCategory().

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

◆ latestModuleVersion()

QTypeRevision QQmlMetaType::latestModuleVersion ( const QString uri)
static

Definition at line 1036 of file qqmlmetatype.cpp.

References QTypeRevision::fromVersion(), and get().

Referenced by QQmlImportDatabase::lockModule(), matchingModuleVersion(), and QQuickStylePlugin::registerTypes().

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

◆ listValueType()

QMetaType QQmlMetaType::listValueType ( QMetaType  type)
static

Definition at line 1124 of file qqmlmetatype.cpp.

References dynamicQmlListMarker(), QMetaType::flags(), QMetaType::id(), QMetaType::iface(), isList(), QMetaType::PointerToQObject, Q_ASSERT, QQmlTypePrivate::typeId, and valueType().

Referenced by QQmlListReferencePrivate::elementType(), and QQmlPropertyPrivate::write().

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

◆ matchingModuleVersion()

QTypeRevision QQmlMetaType::matchingModuleVersion ( const QString module,
QTypeRevision  version 
)
static

Definition at line 1069 of file qqmlmetatype.cpp.

References QTypeRevision::fromVersion(), QTypeRevision::hasMajorVersion(), QTypeRevision::hasMinorVersion(), latestModuleVersion(), QTypeRevision::majorVersion(), and QTypeRevision::minorVersion().

Referenced by QQmlImports::addLibraryImport(), QQuickStyle::setFallbackStyle(), QQuickStyle::setStyle(), and QQmlImports::updateQmldirContent().

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

◆ metaObjectForType()

QQmlMetaObject QQmlMetaType::metaObjectForType ( QMetaType  metaType)
static

Look up by type's metaObject.

Definition at line 1410 of file qqmlmetatype.cpp.

References QMetaType::id(), and QQmlType::metaObject().

Referenced by dynamicQmlMetaObject(), instanceOfQObject(), QQmlPrivate::isTypeCompatible(), and QQmlPrivate::AOTCompiledContext::loadTypeLookup().

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

◆ metaObjectForValueType() [1/2]

static const QMetaObject * QQmlMetaType::metaObjectForValueType ( const QQmlType qmlType)
inlinestatic

Definition at line 246 of file qqmlmetatype_p.h.

References QQmlType::extensionMetaObject(), QMetaType::IsGadget, and QQmlType::metaObject().

+ Here is the call graph for this function:

◆ metaObjectForValueType() [2/2]

const QMetaObject * QQmlMetaType::metaObjectForValueType ( QMetaType  type)
static

◆ moduleImports()

QList< QQmlDirParser::Import > QQmlMetaType::moduleImports ( const QString uri,
QTypeRevision  version 
)
static

Definition at line 828 of file qqmlmetatype.cpp.

References begin(), QTypeRevision::hasMajorVersion(), it, and QQmlMetaTypeData::VersionedUri::uri.

+ Here is the call graph for this function:

◆ obtainExecutableCompilationUnit()

QQmlRefPointer< QV4::ExecutableCompilationUnit > QQmlMetaType::obtainExecutableCompilationUnit ( QMetaType  type)
static

Definition at line 1944 of file qqmlmetatype.cpp.

Referenced by QQmlTypeData::done().

+ Here is the caller graph for this function:

◆ parentFunctions()

QList< QQmlPrivate::AutoParentFunction > QQmlMetaType::parentFunctions ( )
static

Definition at line 1103 of file qqmlmetatype.cpp.

Referenced by QtObject::createQmlObject(), and QQmlComponent_setQmlParent().

+ Here is the caller graph for this function:

◆ prependCachedUnitLookupFunction()

void QQmlMetaType::prependCachedUnitLookupFunction ( QQmlPrivate::QmlUnitCacheLookupFunction  handler)
static

Definition at line 1694 of file qqmlmetatype.cpp.

◆ prettyTypeName()

QString QQmlMetaType::prettyTypeName ( const QObject object)
static

Returns the pretty QML type name (e.g.

'Item' instead of 'QtQuickItem') for the given object.

Definition at line 1709 of file qqmlmetatype.cpp.

References QMetaType::fromName(), QString::fromUtf8(), qmlType(), qmlTypeName(), and typeName.

Referenced by QQuickContentItem::QQuickContentItem(), QQuickContentItem::QQuickContentItem(), QQmlInfo::~QQmlInfo(), PolishLoopDetector::check(), QQuickLayout::dumpLayoutTreeRecursive(), QQuickStackElement::fromObject(), QQuickRectangle::setGradient(), QQmlComponentPrivate::setInitialProperty(), QQmlBindPrivate::validate(), and QQmlBindEntry::validate().

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

◆ propertyCache() [1/3]

QQmlPropertyCache::ConstPtr QQmlMetaType::propertyCache ( const QMetaObject metaObject,
QTypeRevision  version = QTypeRevision() 
)
static

Definition at line 1376 of file qqmlmetatype.cpp.

References metaObject().

+ Here is the call graph for this function:

◆ propertyCache() [2/3]

QQmlPropertyCache::ConstPtr QQmlMetaType::propertyCache ( const QQmlType type,
QTypeRevision  version 
)
static

Definition at line 1383 of file qqmlmetatype.cpp.

◆ propertyCache() [3/3]

QQmlPropertyCache::ConstPtr QQmlMetaType::propertyCache ( QObject obj,
QTypeRevision  version = QTypeRevision() 
)
static

Returns a QQmlPropertyCache for obj if one is available.

If obj is null, being deleted or contains a dynamic meta object, nullptr is returned.

Definition at line 1369 of file qqmlmetatype.cpp.

References QObjectPrivate::get(), metaObject(), and propertyCache().

Referenced by addTypeReferenceChecksumsToHash(), cacheForObject(), QV4::ResolvedTypeReference::createPropertyCache(), getObjectPropertyData(), QQuickDesignerSupportProperties::getPropertyCache(), QQmlAbstractBinding::getPropertyData(), QQmlBindingInstantiationContext::instantiatingPropertyCache(), propertyCache(), QQmlPropertyCacheCreator< ObjectContainer >::propertyCacheForObject(), qQmlPropertyCacheProperty(), and QQmlAbstractBinding::setTarget().

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

◆ propertyCacheForType()

QQmlPropertyCache::ConstPtr QQmlMetaType::propertyCacheForType ( QMetaType  metaType)
static

Look up by type's metaObject and version.

Definition at line 1427 of file qqmlmetatype.cpp.

References QMetaType::id(), metaObject(), and mo.

Referenced by QQmlVMEMetaObjectEndpoint::tryConnect().

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

◆ protectModule()

bool QQmlMetaType::protectModule ( const QString uri,
QTypeRevision  version,
bool  weakProtectAllVersions = false 
)
static

Definition at line 788 of file qqmlmetatype.cpp.

References QTypeRevision::hasMajorVersion(), it, QQmlTypeModule::Strong, and QQmlTypeModule::Weak.

Referenced by QQmlImportDatabase::lockModule(), and qmlProtectModule().

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

◆ proxyData()

QList< QQmlProxyMetaObject::ProxyData > QQmlMetaType::proxyData ( const QMetaObject mo,
const QMetaObject baseMetaObject,
QMetaObject lastMetaObject 
)
static

Definition at line 1748 of file qqmlmetatype.cpp.

References clone(), CloneAll, CloneEnumsOnly, QList< T >::constLast(), QQmlType::CppType, QMetaObject::d, QList< T >::isEmpty(), mo, registerMetaObjectForType(), QQmlType::SingletonType, QMetaObject::Data::superdata, and QMetaObjectBuilder::toMetaObject().

Referenced by QQmlTypePrivate::init().

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

◆ qmlAllTypes()

QList< QQmlType > QQmlMetaType::qmlAllTypes ( )
static

Returns the list of all registered types.

Definition at line 1622 of file qqmlmetatype.cpp.

◆ qmlInsertModuleRegistration()

void QQmlMetaType::qmlInsertModuleRegistration ( const QString uri,
void(*)()  registerFunction 
)
static

Definition at line 274 of file qqmlmetatype.cpp.

References qFatal, and qPrintable.

Referenced by QQmlModuleRegistration::QQmlModuleRegistration().

+ Here is the caller graph for this function:

◆ qmlListType()

QQmlType QQmlMetaType::qmlListType ( QMetaType  metaType)
static

Definition at line 1324 of file qqmlmetatype.cpp.

References QMetaType::id().

Referenced by QV4::coerceListType(), QV4::ExecutionEngine::fromData(), QV4::SequencePrototype::fromVariant(), QV4::loadProperty(), QQmlVMEMetaObject::metaCall(), QQmlListAccessor::setList(), QV4::Heap::Sequence::setVariant(), and QV4::SequencePrototype::toVariant().

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

◆ qmlRegisterModuleTypes()

bool QQmlMetaType::qmlRegisterModuleTypes ( const QString uri)
static

Definition at line 296 of file qqmlmetatype.cpp.

Referenced by postProcessQmldir().

+ Here is the caller graph for this function:

◆ qmlRemoveModuleRegistration()

void QQmlMetaType::qmlRemoveModuleRegistration ( const QString uri)
static

Definition at line 283 of file qqmlmetatype.cpp.

References qFatal, and qPrintable.

Referenced by QQmlModuleRegistration::~QQmlModuleRegistration().

+ Here is the caller graph for this function:

◆ qmlSingletonTypes()

QList< QQmlType > QQmlMetaType::qmlSingletonTypes ( )
static

Returns the list of registered QML singleton types.

Definition at line 1631 of file qqmlmetatype.cpp.

References QList< T >::append().

+ Here is the call graph for this function:

◆ qmlType() [1/6]

QQmlType QQmlMetaType::qmlType ( const QHashedStringRef name,
const QHashedStringRef module,
QTypeRevision  version 
)
static

Returns the type (if any) of name in module and the specified version.

If version has no major version, accept any version. If version has no minor version, accept any minor version. If module is empty, search in all modules and accept any version.

Definition at line 1253 of file qqmlmetatype.cpp.

References QSet< T >::cend(), QSet< T >::constFind(), QString::fromRawData(), QHashedStringRef::isEmpty(), and it.

+ Here is the call graph for this function:

◆ qmlType() [2/6]

QQmlType QQmlMetaType::qmlType ( const QMetaObject metaObject)
static

Returns the type (if any) that corresponds to the metaObject.

Returns an invalid type if no such type is registered.

Definition at line 1274 of file qqmlmetatype.cpp.

References metaObject().

+ Here is the call graph for this function:

◆ qmlType() [3/6]

QQmlType QQmlMetaType::qmlType ( const QMetaObject metaObject,
const QHashedStringRef module,
QTypeRevision  version 
)
static

Returns the type (if any) that corresponds to the metaObject in version specified by version_major and version_minor in module specified by uri.

Returns null if no type is registered.

Definition at line 1285 of file qqmlmetatype.cpp.

References QHashedStringRef::isEmpty(), it, and metaObject().

+ Here is the call graph for this function:

◆ qmlType() [4/6]

QQmlType QQmlMetaType::qmlType ( const QString qualifiedName,
QTypeRevision  version 
)
static

◆ qmlType() [5/6]

QQmlType QQmlMetaType::qmlType ( const QUrl unNormalizedUrl,
bool  includeNonFileImports = false 
)
static

Returns the type (if any) that corresponds to the given url in the set of composite types added through file imports.

Returns null if no such type is registered.

Definition at line 1337 of file qqmlmetatype.cpp.

References QQmlTypeLoader::normalize(), and url.

+ Here is the call graph for this function:

◆ qmlType() [6/6]

QQmlType QQmlMetaType::qmlType ( QMetaType  metaType)
static

Returns the type (if any) that corresponds to metaType.

Returns an invalid QQmlType if no such type is registered.

Definition at line 1317 of file qqmlmetatype.cpp.

References QMetaType::id().

+ Here is the call graph for this function:

◆ qmlTypeById()

QQmlType QQmlMetaType::qmlTypeById ( int  qmlTypeId)
static

Returns the type (if any) that corresponds to qmlTypeId.

Returns an invalid QQmlType if no such type is registered.

Definition at line 1304 of file qqmlmetatype.cpp.

References qmlTypeId().

Referenced by QQmlEngine::singletonInstance().

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

◆ qmlTypeNames()

QList< QString > QQmlMetaType::qmlTypeNames ( )
static

Returns the list of registered QML type names.

Definition at line 1589 of file qqmlmetatype.cpp.

References QSet< T >::cbegin(), QSet< T >::cend(), and it.

+ Here is the call graph for this function:

◆ qmlTypes()

QList< QQmlType > QQmlMetaType::qmlTypes ( )
static

Returns the list of registered QML types.

Definition at line 1608 of file qqmlmetatype.cpp.

◆ rawMetaObjectForType()

QQmlMetaObject QQmlMetaType::rawMetaObjectForType ( QMetaType  metaType)
static

Look up by type's baseMetaObject.

Definition at line 1395 of file qqmlmetatype.cpp.

References QQmlTypePrivate::baseMetaObject, and QMetaType::id().

Referenced by QQmlListReferencePrivate::elementType(), QQmlPropertyPrivate::rawMetaObjectForType(), and QQmlPropertyPrivate::write().

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

◆ rawPropertyCacheForType() [1/2]

QQmlPropertyCache::ConstPtr QQmlMetaType::rawPropertyCacheForType ( QMetaType  metaType)
static

Look up by type's baseMetaObject and unspecified/any version. TODO: Is this correct? Passing a plain QTypeRevision() rather than QTypeRevision::zero() or the actual type's version seems strange. The behavior has been in place for a while.

Definition at line 1449 of file qqmlmetatype.cpp.

References findPropertyCacheInCompositeTypes(), and QMetaType::id().

Referenced by QQmlBindingInstantiationContext::instantiatingPropertyCache().

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

◆ rawPropertyCacheForType() [2/2]

QQmlPropertyCache::ConstPtr QQmlMetaType::rawPropertyCacheForType ( QMetaType  metaType,
QTypeRevision  version 
)
static

Look up by QQmlType and version. We only fall back to lookup by metaobject if the type has no revisiononed attributes here. Unspecified versions are interpreted as "any".

Definition at line 1467 of file qqmlmetatype.cpp.

References QMetaType::id(), metaObject(), Q_ASSERT, and QQmlTypePrivate::typeId.

+ Here is the call graph for this function:

◆ registerAutoParentFunction()

int QQmlMetaType::registerAutoParentFunction ( const QQmlPrivate::RegisterAutoParent autoparent)
static

Definition at line 332 of file qqmlmetatype.cpp.

References function, and qFatal.

Referenced by QQmlPrivate::qmlregister().

+ Here is the caller graph for this function:

◆ registerCompositeSingletonType()

QQmlType QQmlMetaType::registerCompositeSingletonType ( const QQmlPrivate::RegisterCompositeSingletonType type)
static

Definition at line 515 of file qqmlmetatype.cpp.

References addTypeToData(), checkRegistration(), QQmlType::CompositeSingletonType, createQQmlType(), files, QString::fromUtf8(), QQmlTypeLoader::normalize(), priv(), qFatal, and typeName.

Referenced by QQmlPrivate::qmlregister().

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

◆ registerCompositeType()

QQmlType QQmlMetaType::registerCompositeType ( const QQmlPrivate::RegisterCompositeType type)
static

Definition at line 541 of file qqmlmetatype.cpp.

References addTypeToData(), checkRegistration(), QQmlType::CompositeType, createQQmlType(), files, QString::fromUtf8(), QQmlTypeLoader::normalize(), priv(), qFatal, and typeName.

Referenced by QQmlPrivate::qmlregister().

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

◆ registerInterface()

QQmlType QQmlMetaType::registerInterface ( const QQmlPrivate::RegisterInterface type)
static

Definition at line 350 of file qqmlmetatype.cpp.

References createQQmlType(), priv(), Q_ASSERT, and qFatal.

Referenced by QQmlPrivate::qmlregister().

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

◆ registerInternalCompositeType()

void QQmlMetaType::registerInternalCompositeType ( const QQmlRefPointer< QV4::ExecutableCompilationUnit > &  compilationUnit)
static

Definition at line 1886 of file qqmlmetatype.cpp.

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

Referenced by QV4::ExecutableCompilationUnit::finalizeCompositeType().

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

◆ registerMetaObjectForType()

void QQmlMetaType::registerMetaObjectForType ( const QMetaObject metaobject,
QQmlTypePrivate type 
)
static

Definition at line 1511 of file qqmlmetatype.cpp.

References Q_ASSERT.

Referenced by QQmlTypePrivate::init(), and proxyData().

+ Here is the caller graph for this function:

◆ registerModule()

void QQmlMetaType::registerModule ( const char *  uri,
QTypeRevision  version 
)
static

Definition at line 864 of file qqmlmetatype.cpp.

References QQmlTypeModule::addMinorVersion(), QString::fromUtf8(), getTypeModule(), QTypeRevision::hasMinorVersion(), QTypeRevision::minorVersion(), and Q_ASSERT.

Referenced by qmlRegisterModule().

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

◆ registerModuleImport()

void QQmlMetaType::registerModuleImport ( const QString uri,
QTypeRevision  version,
const QQmlDirParser::Import import 
)
static

Definition at line 813 of file qqmlmetatype.cpp.

Referenced by QQmlEngine::qmlRegisterModuleImport().

+ Here is the caller graph for this function:

◆ registerPluginTypes()

QQmlMetaType::RegistrationResult QQmlMetaType::registerPluginTypes ( QObject instance,
const QString basePath,
const QString uri,
const QString typeNamespace,
QTypeRevision  version,
QList< QQmlError > *  errors 
)
static

Definition at line 909 of file qqmlmetatype.cpp.

References arg, QByteArray::constData(), error, Failure, QString::isEmpty(), namespaceContainsRegistrations(), NoRegistrationFunction, QList< T >::prepend(), Q_UNUSED, qPrintable, QStringLiteral, qWarning, Success, QString::toUtf8(), and QQmlImports::urlFromLocalFileOrQrcOrUrl().

Referenced by QQmlPluginImporter::importDynamicPlugin(), and QQmlPluginImporter::importStaticPlugin().

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

◆ registerSequentialContainer()

QQmlType QQmlMetaType::registerSequentialContainer ( const QQmlPrivate::RegisterSequentialContainer sequenceRegistration)
static

Definition at line 755 of file qqmlmetatype.cpp.

References addTypeToData(), checkRegistration(), QString::fromUtf8(), QQmlPrivate::RegisterSequentialContainer::metaSequence, priv(), qFatal, QMetaObjectPrivate::revision, QQmlPrivate::RegisterSequentialContainer::revision, QQmlType::SequentialContainerType, QQmlPrivate::RegisterSequentialContainer::structVersion, QQmlPrivate::RegisterSequentialContainer::typeId, QQmlPrivate::RegisterSequentialContainer::uri, QMetaSequence::valueMetaType(), and QQmlPrivate::RegisterSequentialContainer::version.

Referenced by QQmlPrivate::qmlregister().

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

◆ registerSingletonType()

QQmlType QQmlMetaType::registerSingletonType ( const QQmlPrivate::RegisterSingletonType type)
static

Definition at line 495 of file qqmlmetatype.cpp.

References addTypeToData(), checkRegistration(), createQQmlType(), QMetaType::flags(), QString::fromUtf8(), priv(), qFatal, QQmlType::SingletonType, and typeName.

Referenced by QQmlPrivate::qmlregister().

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

◆ registerType()

QQmlType QQmlMetaType::registerType ( const QQmlPrivate::RegisterType type)
static

Definition at line 476 of file qqmlmetatype.cpp.

References addTypeToData(), checkRegistration(), QQmlType::CppType, createQQmlType(), QQmlPrivate::RegisterType::CurrentVersion, QMetaType::flags(), QString::fromUtf8(), priv(), and qFatal.

Referenced by QQmlPrivate::qmlregister().

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

◆ registerTypeAlias()

void QQmlMetaType::registerTypeAlias ( int  typeId,
const QString name 
)
static

Definition at line 324 of file qqmlmetatype.cpp.

References priv().

Referenced by QQmlEnginePrivate::init().

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

◆ registerUndeletableType()

void QQmlMetaType::registerUndeletableType ( const QQmlType dtype)
static

Definition at line 890 of file qqmlmetatype.cpp.

Referenced by QQmlPrivate::qmlregister().

+ Here is the caller graph for this function:

◆ registerUnitCacheHook()

int QQmlMetaType::registerUnitCacheHook ( const QQmlPrivate::RegisterQmlUnitCacheHook hookRegistration)
static

Definition at line 744 of file qqmlmetatype.cpp.

References QQmlPrivate::RegisterQmlUnitCacheHook::lookupCachedQmlUnit, qFatal, and QQmlPrivate::RegisterQmlUnitCacheHook::structVersion.

Referenced by QQmlPrivate::qmlregister().

+ Here is the caller graph for this function:

◆ removeCachedUnitLookupFunction()

void QQmlMetaType::removeCachedUnitLookupFunction ( QQmlPrivate::QmlUnitCacheLookupFunction  handler)
static

Definition at line 1700 of file qqmlmetatype.cpp.

Referenced by QQmlPrivate::qmlunregister().

+ Here is the caller graph for this function:

◆ removeFromInlineComponents()

template<typename InlineComponentContainer >
static void QQmlMetaType::removeFromInlineComponents ( InlineComponentContainer &  container,
const QQmlTypePrivate reference 
)
inlinestatic

Definition at line 202 of file qqmlmetatype_p.h.

References QSet< T >::begin(), QSet< T >::erase(), it, and QQmlType::sourceUrl().

Referenced by freeUnusedTypesAndCaches(), and unregisterType().

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

◆ removeQQmlTypePrivate()

template<typename QQmlTypeContainer >
static void QQmlMetaType::removeQQmlTypePrivate ( QQmlTypeContainer &  container,
const QQmlTypePrivate reference 
)
inlinestatic

Definition at line 190 of file qqmlmetatype_p.h.

References QSet< T >::begin(), QSet< T >::end(), QSet< T >::erase(), and it.

Referenced by freeUnusedTypesAndCaches(), QQmlTypeModule::remove(), and unregisterType().

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

◆ toQObject()

QObject * QQmlMetaType::toQObject ( const QVariant v,
bool *  ok = nullptr 
)
static

Definition at line 1109 of file qqmlmetatype.cpp.

References ok, and QMetaType::PointerToQObject.

Referenced by QQuickDesignerSupportProperties::allPropertyNames(), allSubObjects(), propertyNameListForWritableProperties(), QQuickDesignerSupportProperties::readQObjectProperty(), and QQmlPropertyPrivate::write().

+ Here is the caller graph for this function:

◆ typeForUrl()

QQmlType QQmlMetaType::typeForUrl ( const QString urlString,
const QHashedStringRef typeName,
CompositeTypeLookupMode  mode,
QList< QQmlError > *  errors,
QTypeRevision  version = QTypeRevision() 
)
static

Definition at line 1007 of file qqmlmetatype.cpp.

References createTypeForUrl(), QQmlTypeLoader::normalize(), ret, and url.

Referenced by QQmlImportInstance::resolveType().

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

◆ typeId()

int QQmlMetaType::typeId ( const char *  uri,
QTypeRevision  version,
const char *  qmlName 
)
static

Definition at line 875 of file qqmlmetatype.cpp.

References QString::fromUtf8(), getTypeModule(), QQmlType::index(), and QQmlTypeModule::type().

Referenced by qmlTypeId().

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

◆ typeModule()

QQmlTypeModule * QQmlMetaType::typeModule ( const QString uri,
QTypeRevision  version 
)
static

Definition at line 1090 of file qqmlmetatype.cpp.

References get(), QTypeRevision::hasMajorVersion(), and nullptr.

Referenced by findCompositeSingletons(), QQmlImports::populateCache(), postProcessQmldir(), and LoadHelper::resolveType().

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

◆ unregisterAutoParentFunction()

void QQmlMetaType::unregisterAutoParentFunction ( const QQmlPrivate::AutoParentFunction function)
static

Definition at line 344 of file qqmlmetatype.cpp.

References function.

Referenced by QQmlPrivate::qmlunregister().

+ Here is the caller graph for this function:

◆ unregisterInternalCompositeType() [1/2]

void QQmlMetaType::unregisterInternalCompositeType ( const QQmlRefPointer< QV4::ExecutableCompilationUnit > &  compilationUnit)
static

Definition at line 1903 of file qqmlmetatype.cpp.

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

+ Here is the call graph for this function:

◆ unregisterInternalCompositeType() [2/2]

void QQmlMetaType::unregisterInternalCompositeType ( QMetaType  metaType,
QMetaType  listMetaType 
)
static

Definition at line 723 of file qqmlmetatype.cpp.

References QSet< T >::constEnd(), QSet< T >::constFind(), QMetaType::id(), QMetaType::iface(), it, and QMetaType::unregisterMetaType().

Referenced by QQmlTypeLoader::trimCache().

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

◆ unregisterModuleImport()

void QQmlMetaType::unregisterModuleImport ( const QString uri,
QTypeRevision  version,
const QQmlDirParser::Import import 
)
static

Definition at line 821 of file qqmlmetatype.cpp.

Referenced by QQmlEngine::qmlUnregisterModuleImport().

+ Here is the caller graph for this function:

◆ unregisterSequentialContainer()

void QQmlMetaType::unregisterSequentialContainer ( int  id)
static

Definition at line 783 of file qqmlmetatype.cpp.

References unregisterType().

Referenced by QQmlPrivate::qmlunregister().

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

◆ unregisterType()

void QQmlMetaType::unregisterType ( int  type)
static

Definition at line 1491 of file qqmlmetatype.cpp.

References QQmlType::CompositeSingletonType, QQmlType::CompositeType, d, removeFromInlineComponents(), and removeQQmlTypePrivate().

Referenced by QQmlPrivate::qmlunregister(), and unregisterSequentialContainer().

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

◆ valueType()

QQmlValueType * QQmlMetaType::valueType ( QMetaType  metaType)
static

Definition at line 1867 of file qqmlmetatype.cpp.

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

Referenced by changeThroughGadgetPtrWrapper(), isValueType(), listValueType(), VDMListDelegateDataType::metaObjectFromType(), QQmlPropertyPrivate::readValueProperty(), QQmlVMEMetaObjectEndpoint::tryConnect(), and QQmlEnginePrivate::valueTypeInstance().

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

Friends And Related Symbol Documentation

◆ QQmlDesignerMetaObject

friend class QQmlDesignerMetaObject
friend

Definition at line 35 of file qqmlmetatype_p.h.


The documentation for this class was generated from the following files: