Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QQmlMetaType Class Reference

\inmodule QtQml More...

#include <qqmlmetatype_p.h>

Collaboration diagram for QQmlMetaType:

Public Types

enum class  RegistrationResult { Success , Failure , NoRegistrationFunction }
enum  CompositeTypeLookupMode { NonSingleton , Singleton , JavaScript }
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 &namename)
static bool equalBaseUrls (const QUrl &aUrl, const QUrl &bUrl)
static QUrl normalizedUrl (const QUrl &unNormalizedUrl)
static QQmlType findCompositeType (const QUrl &url, const QQmlRefPointer< QV4::CompiledData::CompilationUnit > &compilationUnit, CompositeTypeLookupMode modemode=NonSingleton)
static QQmlType findOrCreateFactualInlineComponentType (const QUrl &url, const QQmlRefPointer< QV4::CompiledData::CompilationUnit > &compilationUnit)
static QQmlType findOrCreateFactualInlineComponentType (const QUrl &baseUrl, const QString &namename, const QQmlRefPointer< QV4::CompiledData::CompilationUnit > &compilationUnit)
static QQmlType registerType (const QQmlPrivate::RegisterType &typetype)
static QQmlType registerInterface (const QQmlPrivate::RegisterInterface &typetype)
static QQmlType registerSingletonType (const QQmlPrivate::RegisterSingletonType &typetype, const QQmlType::SingletonInstanceInfo::ConstPtr &siinfo)
static QQmlType registerCompositeSingletonType (const QQmlPrivate::RegisterCompositeSingletonType &typetype, const QQmlType::SingletonInstanceInfo::ConstPtr &siinfo)
static QQmlType registerCompositeType (const QQmlPrivate::RegisterCompositeType &typetype)
static RegistrationResult registerPluginTypes (QObject *instance, const QString &basePath, const QString &uri, const QString &typeNamespace, QTypeRevision version, QList< QQmlError > *errors)
static QQmlType typeForUrl (const QUrl &url, const QHashedStringRef &typeName, CompositeTypeLookupMode modemode, QList< QQmlError > *errors, QTypeRevision version=QTypeRevision())
static QQmlType findOrCreateSpeculativeInlineComponentType (const QUrl &url)
static QQmlType findOrCreateSpeculativeInlineComponentType (const QQmlType &outerType, const QString &namename)
static void unregisterType (int typetype)
static void registerMetaObjectForType (const QMetaObject *metaobject, const QQmlTypePrivate *typetype)
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::Import > moduleImports (const QString &uri, QTypeRevision version)
static int typeId (const char *uri, QTypeRevision version, const char *qmlName)
static void registerUndeletableType (const QQmlType &dtype)
static QList< QString > qmlTypeNames ()
 Returns the list of registered QML type names.
static QList< QQmlType > qmlTypes ()
 Returns the list of registered QML types.
static QList< QQmlType > qmlSingletonTypes ()
 Returns the list of registered QML singleton types.
static QList< QQmlType > qmlAllTypes ()
 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 &namename, 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 firstQmlTypeForAttachmentMetaObject (const QMetaObject *attachmentMetaObject)
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)
 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 &typetype, 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 QVarLengthArray< QQmlPropertyCache::ConstPtr, 4 > rawCompositePropertyCachesForType (QMetaType metaType)
static bool canConvert (QObject *o, QMetaType metaType)
static bool canConvert (const QQmlPropertyCache::ConstPtr &from, QMetaType metaType)
static bool canLosslesslyHoldUndefined (QMetaType metaType)
static void freeUnusedTypesAndCaches ()
static QMetaProperty defaultProperty (const QMetaObject *)
static QMetaProperty defaultProperty (QObject *)
static QMetaMethod defaultMethod (const QMetaObject *)
static QMetaMethod defaultMethod (QObject *)
static QObject * toQObject (const QVariant &, bool *ok=nullptr)
static QMetaType listValueType (QMetaType typetype)
static QQmlAttachedPropertiesFunc attachedPropertiesFunc (QQmlTypeLoader *typeLoader, const QMetaObject *)
static bool isInterface (QMetaType typetype)
 See qmlRegisterInterface() for information about when this will return true.
static const char * interfaceIId (QMetaType typetype)
static bool isList (QMetaType typetype)
static QTypeRevision latestModuleVersion (const QString &uri)
static bool isStronglyLockedModule (const QString &uri, QTypeRevision version)
static QTypeRevision matchingModuleVersion (const QString &module, QTypeRevision version)
static QQmlTypeModule * typeModule (const QString &uri, QTypeRevision version)
static QList< QQmlPrivate::AutoParentFunction > parentFunctions ()
static const QQmlPrivate::CachedQmlUnit * findCachedCompilationUnit (const QUrl &uri, CacheMode modemode, CachedUnitLookupError *status)
static void prependCachedUnitLookupFunction (QQmlPrivate::QmlUnitCacheLookupFunction handler)
static void removeCachedUnitLookupFunction (QQmlPrivate::QmlUnitCacheLookupFunction handler)
static QString prettyTypeName (const QObject *objectobject)
 Returns the pretty QML type name (e.g.
template<typename QQmlTypeContainer>
static void removeQQmlTypePrivate (QQmlTypeContainer &container, const QQmlTypePrivate *referencereference)
template<typename InlineComponentContainer>
static void removeFromInlineComponents (InlineComponentContainer &container, const QQmlTypePrivate *referencereference)
static void removeFromInlineComponents (QSet< QUrl > &container, const QQmlTypePrivate *referencereference)
static void registerTypeAlias (int typeId, const QString &namename)
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 idid)
static int registerUnitCacheHook (const QQmlPrivate::RegisterQmlUnitCacheHook &hookRegistration)
static void clearTypeRegistrations ()
static QList< QQmlProxyMetaObject::ProxyData > proxyData (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 typetype)
static QQmlValueType * valueType (QMetaType metaType)
static const QMetaObject * metaObjectForValueType (QMetaType typetype)
static QQmlPropertyCache::ConstPtr findPropertyCacheInCompositeTypes (QMetaType tt)
static void registerInternalCompositeType (const QQmlRefPointer< QV4::CompiledData::CompilationUnit > &compilationUnit)
static void unregisterInternalCompositeType (const QQmlRefPointer< QV4::CompiledData::CompilationUnit > &compilationUnit)
static void deepClearCompositeType (const QQmlRefPointer< QV4::CompiledData::CompilationUnit > &oldUnit)
static int countInternalCompositeTypeSelfReferences (const QQmlRefPointer< QV4::CompiledData::CompilationUnit > &compilationUnit)
static QQmlRefPointer< QV4::CompiledData::CompilationUnit > obtainCompilationUnit (QMetaType typetype)
static QQmlRefPointer< QV4::CompiledData::CompilationUnit > obtainCompilationUnit (const QUrl &url)

Friends

class QQmlDesignerMetaObject

Detailed Description

\inmodule QtQml

Definition at line 42 of file qqmlmetatype_p.h.

Member Enumeration Documentation

◆ CachedUnitLookupError

Enumerator
NoError 
NoUnitFound 
VersionMismatch 
NotFullyTyped 

Definition at line 208 of file qqmlmetatype_p.h.

◆ CacheMode

Enumerator
RejectAll 
AcceptUntyped 
RequireFullyTyped 

Definition at line 215 of file qqmlmetatype_p.h.

◆ ClonePolicy

Enumerator
CloneAll 
CloneEnumsOnly 

Definition at line 278 of file qqmlmetatype_p.h.

◆ CompositeTypeLookupMode

Enumerator
NonSingleton 
Singleton 
JavaScript 

Definition at line 81 of file qqmlmetatype_p.h.

◆ RegistrationResult

Enumerator
Success 
Failure 
NoRegistrationFunction 

Definition at line 48 of file qqmlmetatype_p.h.

Member Function Documentation

◆ attachedPropertiesFunc()

QQmlAttachedPropertiesFunc QQmlMetaType::attachedPropertiesFunc ( QQmlTypeLoader * typeLoader,
const QMetaObject * mo )
static

Definition at line 1184 of file qqmlmetatype.cpp.

◆ canConvert() [1/2]

bool QQmlMetaType::canConvert ( const QQmlPropertyCache::ConstPtr & from,
QMetaType metaType )
static

Definition at line 1673 of file qqmlmetatype.cpp.

◆ canConvert() [2/2]

bool QQmlMetaType::canConvert ( QObject * o,
QMetaType metaType )
static

Definition at line 1650 of file qqmlmetatype.cpp.

◆ canLosslesslyHoldUndefined()

bool QQmlMetaType::canLosslesslyHoldUndefined ( QMetaType metaType)
static

Definition at line 1689 of file qqmlmetatype.cpp.

◆ clearTypeRegistrations()

void QQmlMetaType::clearTypeRegistrations ( )
static

Definition at line 325 of file qqmlmetatype.cpp.

◆ clone()

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

Definition at line 229 of file qqmlmetatype.cpp.

◆ countInternalCompositeTypeSelfReferences()

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

Definition at line 2272 of file qqmlmetatype.cpp.

◆ deepClearCompositeType()

void QQmlMetaType::deepClearCompositeType ( const QQmlRefPointer< QV4::CompiledData::CompilationUnit > & oldUnit)
static

Definition at line 2263 of file qqmlmetatype.cpp.

◆ defaultMethod() [1/2]

QMetaMethod QQmlMetaType::defaultMethod ( const QMetaObject * metaObject)
static

Definition at line 1219 of file qqmlmetatype.cpp.

◆ defaultMethod() [2/2]

QMetaMethod QQmlMetaType::defaultMethod ( QObject * obj)
static

Definition at line 1236 of file qqmlmetatype.cpp.

◆ defaultProperty() [1/2]

QMetaProperty QQmlMetaType::defaultProperty ( const QMetaObject * metaObject)
static

Definition at line 1193 of file qqmlmetatype.cpp.

◆ defaultProperty() [2/2]

QMetaProperty QQmlMetaType::defaultProperty ( QObject * obj)
static

Definition at line 1210 of file qqmlmetatype.cpp.

◆ equalBaseUrls()

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

Definition at line 61 of file qqmlmetatype_p.h.

◆ findCachedCompilationUnit()

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

Definition at line 1921 of file qqmlmetatype.cpp.

◆ findCompositeType()

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

Definition at line 703 of file qqmlmetatype.cpp.

◆ findOrCreateFactualInlineComponentType() [1/2]

QQmlType QQmlMetaType::findOrCreateFactualInlineComponentType ( const QUrl & baseUrl,
const QString & name,
const QQmlRefPointer< QV4::CompiledData::CompilationUnit > & compilationUnit )
inlinestatic

Definition at line 94 of file qqmlmetatype_p.h.

◆ findOrCreateFactualInlineComponentType() [2/2]

QQmlType QQmlMetaType::findOrCreateFactualInlineComponentType ( const QUrl & url,
const QQmlRefPointer< QV4::CompiledData::CompilationUnit > & compilationUnit )
static

Definition at line 755 of file qqmlmetatype.cpp.

◆ findOrCreateSpeculativeInlineComponentType() [1/2]

QQmlType QQmlMetaType::findOrCreateSpeculativeInlineComponentType ( const QQmlType & outerType,
const QString & name )
inlinestatic

Definition at line 119 of file qqmlmetatype_p.h.

◆ findOrCreateSpeculativeInlineComponentType() [2/2]

QQmlType QQmlMetaType::findOrCreateSpeculativeInlineComponentType ( const QUrl & url)
static

Definition at line 1419 of file qqmlmetatype.cpp.

◆ findPropertyCacheInCompositeTypes()

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

Definition at line 2153 of file qqmlmetatype.cpp.

◆ firstQmlTypeForAttachmentMetaObject()

QQmlType QQmlMetaType::firstQmlTypeForAttachmentMetaObject ( const QMetaObject * attachmentMetaObject)
static

Returns the first QQmlType whose attachedPropertiesType equals attachmentMetaObject Note that a single attachment type can be provided by multiple types, though that is rare in practice. Also, in case of self-attachment, we always return the type with the self-attachment, even if another type would come first in the list. This is an optimization for the common case. Returns nullptr if no match is fonud

Definition at line 1359 of file qqmlmetatype.cpp.

◆ freeUnusedTypesAndCaches()

void QQmlMetaType::freeUnusedTypesAndCaches ( )
static

Definition at line 1776 of file qqmlmetatype.cpp.

◆ inlineComponentUrl()

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

Definition at line 54 of file qqmlmetatype_p.h.

◆ interfaceIId()

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

Definition at line 1254 of file qqmlmetatype.cpp.

◆ isInterface()

bool QQmlMetaType::isInterface ( QMetaType type)
static

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

Definition at line 1248 of file qqmlmetatype.cpp.

◆ isList()

bool QQmlMetaType::isList ( QMetaType type)
static

Definition at line 1261 of file qqmlmetatype.cpp.

◆ isStronglyLockedModule()

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

Definition at line 1093 of file qqmlmetatype.cpp.

◆ isValueType()

bool QQmlMetaType::isValueType ( QMetaType type)
static

Definition at line 2087 of file qqmlmetatype.cpp.

◆ latestModuleVersion()

QTypeRevision QQmlMetaType::latestModuleVersion ( const QString & uri)
static

Definition at line 1076 of file qqmlmetatype.cpp.

◆ listValueType()

QMetaType QQmlMetaType::listValueType ( QMetaType type)
static

Definition at line 1164 of file qqmlmetatype.cpp.

◆ matchingModuleVersion()

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

Definition at line 1109 of file qqmlmetatype.cpp.

◆ metaObjectForType()

QQmlMetaObject QQmlMetaType::metaObjectForType ( QMetaType metaType)
static

Look up by type's metaObject.

Definition at line 1511 of file qqmlmetatype.cpp.

◆ metaObjectForValueType()

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

Definition at line 2098 of file qqmlmetatype.cpp.

◆ moduleImports()

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

Definition at line 868 of file qqmlmetatype.cpp.

◆ normalizedUrl()

QUrl QQmlMetaType::normalizedUrl ( const QUrl & unNormalizedUrl)
inlinestatic

Definition at line 73 of file qqmlmetatype_p.h.

◆ obtainCompilationUnit() [1/2]

QQmlRefPointer< QV4::CompiledData::CompilationUnit > QQmlMetaType::obtainCompilationUnit ( const QUrl & url)
static

Definition at line 2288 of file qqmlmetatype.cpp.

◆ obtainCompilationUnit() [2/2]

QQmlRefPointer< QV4::CompiledData::CompilationUnit > QQmlMetaType::obtainCompilationUnit ( QMetaType type)
static

Definition at line 2279 of file qqmlmetatype.cpp.

◆ parentFunctions()

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

Definition at line 1143 of file qqmlmetatype.cpp.

◆ prependCachedUnitLookupFunction()

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

Definition at line 1960 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 1975 of file qqmlmetatype.cpp.

◆ propertyCache() [1/3]

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

Definition at line 1477 of file qqmlmetatype.cpp.

◆ propertyCache() [2/3]

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

Definition at line 1484 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 1470 of file qqmlmetatype.cpp.

◆ propertyCacheForType()

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

Look up by type's metaObject and version.

Definition at line 1528 of file qqmlmetatype.cpp.

◆ protectModule()

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

Definition at line 828 of file qqmlmetatype.cpp.

◆ proxyData()

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

Definition at line 2014 of file qqmlmetatype.cpp.

◆ qmlAllTypes()

QList< QQmlType > QQmlMetaType::qmlAllTypes ( )
static

Returns the list of all registered types.

Definition at line 1881 of file qqmlmetatype.cpp.

◆ qmlInsertModuleRegistration()

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

Definition at line 299 of file qqmlmetatype.cpp.

◆ qmlListType()

QQmlType QQmlMetaType::qmlListType ( QMetaType metaType)
static

Definition at line 1393 of file qqmlmetatype.cpp.

◆ qmlRegisterModuleTypes()

bool QQmlMetaType::qmlRegisterModuleTypes ( const QString & uri)
static

Definition at line 319 of file qqmlmetatype.cpp.

◆ qmlRemoveModuleRegistration()

void QQmlMetaType::qmlRemoveModuleRegistration ( const QString & uri)
static

Definition at line 308 of file qqmlmetatype.cpp.

◆ qmlSingletonTypes()

QList< QQmlType > QQmlMetaType::qmlSingletonTypes ( )
static

Returns the list of registered QML singleton types.

Definition at line 1895 of file qqmlmetatype.cpp.

◆ 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 1293 of file qqmlmetatype.cpp.

◆ 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 1314 of file qqmlmetatype.cpp.

◆ 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 1325 of file qqmlmetatype.cpp.

◆ qmlType() [4/6]

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

Returns the type (if any) of URI-qualified named qualifiedName and version specified by version_major and version_minor.

Definition at line 1273 of file qqmlmetatype.cpp.

◆ qmlType() [5/6]

QQmlType QQmlMetaType::qmlType ( const QUrl & unNormalizedUrl)
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 1406 of file qqmlmetatype.cpp.

◆ 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 1386 of file qqmlmetatype.cpp.

◆ 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 1344 of file qqmlmetatype.cpp.

◆ qmlTypeNames()

QList< QString > QQmlMetaType::qmlTypeNames ( )
static

Returns the list of registered QML type names.

Definition at line 1848 of file qqmlmetatype.cpp.

◆ qmlTypes()

QList< QQmlType > QQmlMetaType::qmlTypes ( )
static

Returns the list of registered QML types.

Definition at line 1867 of file qqmlmetatype.cpp.

◆ rawCompositePropertyCachesForType()

QVarLengthArray< QQmlPropertyCache::ConstPtr, 4 > QQmlMetaType::rawCompositePropertyCachesForType ( QMetaType metaType)
static

Returns all candidate property caches for a composite metatype instead of only the last inserted one. compare rawPropertyCacheForType (which handles however also non-composites)

Definition at line 1577 of file qqmlmetatype.cpp.

◆ rawMetaObjectForType()

QQmlMetaObject QQmlMetaType::rawMetaObjectForType ( QMetaType metaType)
static

Look up by type's baseMetaObject.

Definition at line 1496 of file qqmlmetatype.cpp.

◆ 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 1550 of file qqmlmetatype.cpp.

◆ 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 1589 of file qqmlmetatype.cpp.

◆ registerAutoParentFunction()

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

Definition at line 361 of file qqmlmetatype.cpp.

◆ registerCompositeSingletonType()

QQmlType QQmlMetaType::registerCompositeSingletonType ( const QQmlPrivate::RegisterCompositeSingletonType & type,
const QQmlType::SingletonInstanceInfo::ConstPtr & siinfo )
static

Definition at line 544 of file qqmlmetatype.cpp.

◆ registerCompositeType()

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

Definition at line 568 of file qqmlmetatype.cpp.

◆ registerInterface()

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

Definition at line 379 of file qqmlmetatype.cpp.

◆ registerInternalCompositeType()

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

Definition at line 2159 of file qqmlmetatype.cpp.

◆ registerMetaObjectForType()

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

Definition at line 1731 of file qqmlmetatype.cpp.

◆ registerModule()

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

Definition at line 904 of file qqmlmetatype.cpp.

◆ registerModuleImport()

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

Definition at line 853 of file qqmlmetatype.cpp.

◆ 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 955 of file qqmlmetatype.cpp.

◆ registerSequentialContainer()

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

Definition at line 795 of file qqmlmetatype.cpp.

◆ registerSingletonType()

QQmlType QQmlMetaType::registerSingletonType ( const QQmlPrivate::RegisterSingletonType & type,
const QQmlType::SingletonInstanceInfo::ConstPtr & siinfo )
static

Definition at line 522 of file qqmlmetatype.cpp.

◆ registerType()

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

Definition at line 503 of file qqmlmetatype.cpp.

◆ registerTypeAlias()

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

Definition at line 353 of file qqmlmetatype.cpp.

◆ registerUndeletableType()

void QQmlMetaType::registerUndeletableType ( const QQmlType & dtype)
static

Definition at line 935 of file qqmlmetatype.cpp.

◆ registerUnitCacheHook()

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

Definition at line 784 of file qqmlmetatype.cpp.

◆ removeCachedUnitLookupFunction()

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

Definition at line 1966 of file qqmlmetatype.cpp.

◆ removeFromInlineComponents() [1/2]

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

Definition at line 238 of file qqmlmetatype_p.h.

◆ removeFromInlineComponents() [2/2]

void QQmlMetaType::removeFromInlineComponents ( QSet< QUrl > & container,
const QQmlTypePrivate * reference )
inlinestatic

Definition at line 250 of file qqmlmetatype_p.h.

◆ removeQQmlTypePrivate()

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

Definition at line 226 of file qqmlmetatype_p.h.

◆ toQObject()

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

Definition at line 1149 of file qqmlmetatype.cpp.

◆ typeForUrl()

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

Definition at line 1053 of file qqmlmetatype.cpp.

◆ typeId()

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

Definition at line 915 of file qqmlmetatype.cpp.

◆ typeModule()

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

Definition at line 1130 of file qqmlmetatype.cpp.

◆ unregisterAutoParentFunction()

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

Definition at line 373 of file qqmlmetatype.cpp.

◆ unregisterInternalCompositeType()

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

Definition at line 2226 of file qqmlmetatype.cpp.

◆ unregisterModuleImport()

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

Definition at line 861 of file qqmlmetatype.cpp.

◆ unregisterSequentialContainer()

void QQmlMetaType::unregisterSequentialContainer ( int id)
static

Definition at line 823 of file qqmlmetatype.cpp.

◆ unregisterType()

void QQmlMetaType::unregisterType ( int type)
static

Definition at line 1710 of file qqmlmetatype.cpp.

◆ valueType()

QQmlValueType * QQmlMetaType::valueType ( QMetaType metaType)
static

Definition at line 2140 of file qqmlmetatype.cpp.

◆ QQmlDesignerMetaObject

friend class QQmlDesignerMetaObject
friend

Definition at line 44 of file qqmlmetatype_p.h.


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