![]() |
Qt 6.x
The Qt SDK
|
#include <qqmltype_p.h>
Classes | |
struct | SingletonInstanceInfo |
Public Types | |
enum | RegistrationType { CppType = 0 , SingletonType = 1 , InterfaceType = 2 , CompositeType = 3 , CompositeSingletonType = 4 , InlineComponentType = 5 , SequentialContainerType = 6 , AnyRegistrationType = 255 } |
typedef QVariant(* | CreateValueTypeFunc) (const QJSValue &) |
typedef void(* | CreateFunc) (void *, void *) |
typedef QObject *(* | ExtensionFunc) (QObject *) |
Static Public Member Functions | |
static void | refHandle (const QQmlTypePrivate *priv) |
static void | derefHandle (const QQmlTypePrivate *priv) |
static int | refCount (const QQmlTypePrivate *priv) |
Friends | |
class | QQmlTypePrivate |
size_t | qHash (const QQmlType &t, size_t seed) |
Definition at line 43 of file qqmltype_p.h.
Definition at line 80 of file qqmltype_p.h.
Definition at line 70 of file qqmltype_p.h.
Definition at line 86 of file qqmltype_p.h.
Enumerator | |
---|---|
CppType | |
SingletonType | |
InterfaceType | |
CompositeType | |
CompositeSingletonType | |
InlineComponentType | |
SequentialContainerType | |
AnyRegistrationType |
Definition at line 150 of file qqmltype_p.h.
|
default |
|
default |
|
default |
|
explicit |
Definition at line 102 of file qqmltype.cpp.
|
default |
QQmlAttachedPropertiesFunc QQmlType::attachedPropertiesFunction | ( | QQmlEnginePrivate * | engine | ) | const |
Definition at line 685 of file qqmltype.cpp.
References QQmlTypePrivate::attachedPropertiesBase(), base, and engine.
const QMetaObject * QQmlType::attachedPropertiesType | ( | QQmlEnginePrivate * | engine | ) | const |
Definition at line 692 of file qqmltype.cpp.
References QQmlTypePrivate::attachedPropertiesBase(), base, and engine.
Referenced by QQmlPropertyCacheCreator< ObjectContainer >::propertyCacheForObject().
bool QQmlType::availableInVersion | ( | const QHashedStringRef & | module, |
QTypeRevision | version | ||
) | const |
Definition at line 133 of file qqmltype.cpp.
References availableInVersion(), module(), QQmlTypePrivate::module, and version().
bool QQmlType::availableInVersion | ( | QTypeRevision | version | ) | const |
Definition at line 119 of file qqmltype.cpp.
References QTypeRevision::hasMajorVersion(), QTypeRevision::hasMinorVersion(), QTypeRevision::majorVersion(), QTypeRevision::minorVersion(), version(), and QQmlTypePrivate::version.
Referenced by availableInVersion().
const QMetaObject * QQmlType::baseMetaObject | ( | ) | const |
Definition at line 670 of file qqmltype.cpp.
References QQmlTypePrivate::baseMetaObject.
bool QQmlType::canConstructValueType | ( | ) | const |
Definition at line 536 of file qqmltype.cpp.
References QQmlTypePrivate::QQmlCppTypeData::constructValueType, CppType, QQmlTypePrivate::extraData::cppTypeData, QQmlTypePrivate::extraData, and QQmlTypePrivate::regType.
Referenced by createOrConstructValueType(), and createOrConstructValueType().
bool QQmlType::canPopulateValueType | ( | ) | const |
Definition at line 543 of file qqmltype.cpp.
References CppType, QQmlTypePrivate::extraData::cppTypeData, QQmlTypePrivate::extraData, QQmlTypePrivate::QQmlCppTypeData::populateValueType, and QQmlTypePrivate::regType.
Referenced by createOrConstructValueType(), and createOrConstructValueType().
bool QQmlType::containsRevisionedAttributes | ( | ) | const |
Definition at line 675 of file qqmltype.cpp.
References QQmlTypePrivate::ProxyMetaObjects::containsRevisionedAttributes, and QQmlTypePrivate::init().
QObject * QQmlType::create | ( | ) | const |
Allocates and initializes an object if the type is creatable. Returns a pointer to the object, or nullptr if the type was not creatable.
Definition at line 462 of file qqmltype.cpp.
References create().
Referenced by create(), and createWithQQmlData().
Like create without arguments, but allocates some extra space after the object.
memory | An out-only argument. *memory will point to the start of the additionally allocated memory. |
additionalMemory | The amount of extra memory in bytes that shoudld be allocated. |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 480 of file qqmltype.cpp.
References QQmlTypePrivate::QQmlCppTypeData::allocationSize, QQmlTypePrivate::extraData::cppTypeData, createProxy(), QQmlTypePrivate::extraData, isCreatable(), QQmlTypePrivate::QQmlCppTypeData::newFunc, and QQmlTypePrivate::QQmlCppTypeData::userdata.
QQmlType::CreateFunc QQmlType::createFunction | ( | ) | const |
Definition at line 550 of file qqmltype.cpp.
References CppType, QQmlTypePrivate::extraData::cppTypeData, QQmlTypePrivate::extraData, QQmlTypePrivate::QQmlCppTypeData::newFunc, and QQmlTypePrivate::regType.
Definition at line 913 of file qqmltype.cpp.
References QQmlTypePrivate::ProxyMetaObjects::data, QQmlTypePrivate::init(), QList< T >::isEmpty(), and void.
Referenced by create(), and qmltcCreateDynamicMetaObject().
QQmlType::CreateValueTypeFunc QQmlType::createValueTypeFunction | ( | ) | const |
Definition at line 529 of file qqmltype.cpp.
References CppType, QQmlTypePrivate::extraData::cppTypeData, QQmlTypePrivate::QQmlCppTypeData::createValueTypeFunc, QQmlTypePrivate::extraData, and QQmlTypePrivate::regType.
Referenced by createOrConstructValueType().
QObject * QQmlType::createWithQQmlData | ( | ) | const |
Like create, but also allocates memory behind the object, constructs a QQmlData there and lets the objects declarativeData point to the newly created QQmlData.
Definition at line 498 of file qqmltype.cpp.
References create(), QQmlData::DoesNotOwnMemory, QObjectPrivate::get(), and Q_ASSERT.
Referenced by QQmlComponentPrivate::beginCreate().
QQmlCustomParser * QQmlType::customParser | ( | ) | const |
Definition at line 520 of file qqmltype.cpp.
References CppType, QQmlTypePrivate::extraData::cppTypeData, QQmlTypePrivate::QQmlCppTypeData::customParser, QQmlTypePrivate::extraData, and QQmlTypePrivate::regType.
|
static |
Definition at line 900 of file qqmltype.cpp.
References priv(), and QQmlRefCounted< T >::release().
Referenced by QV4::Heap::QQmlTypeWrapper::destroy(), QV4::Heap::QQmlScopedEnumWrapper::destroy(), and QV4::QQmlTypeWrapper::lookupScopedEnum().
QString QQmlType::elementName | ( | ) | const |
Definition at line 442 of file qqmltype.cpp.
References QQmlTypePrivate::elementName.
Referenced by QV4::Function::Function(), QQmlPropertyCacheCreator< ObjectContainer >::createMetaObject(), findCompositeSingletons(), and QQmlPropertyCacheCreator< ObjectContainer >::metaTypeForParameter().
int QQmlType::enumValue | ( | QQmlEnginePrivate * | engine, |
const QHashedCStringRef & | name, | ||
bool * | ok | ||
) | const |
Definition at line 762 of file qqmltype.cpp.
References engine, QQmlTypePrivate::Enums::enums, QQmlTypePrivate::initEnums(), ok, Q_ASSERT, and QStringHash< T >::value().
int QQmlType::enumValue | ( | QQmlEnginePrivate * | engine, |
const QHashedStringRef & | name, | ||
bool * | ok | ||
) | const |
Definition at line 748 of file qqmltype.cpp.
References engine, QQmlTypePrivate::Enums::enums, QQmlTypePrivate::initEnums(), ok, Q_ASSERT, and QStringHash< T >::value().
int QQmlType::enumValue | ( | QQmlEnginePrivate * | engine, |
const QV4::String * | name, | ||
bool * | ok | ||
) | const |
Definition at line 776 of file qqmltype.cpp.
References engine, QQmlTypePrivate::Enums::enums, QQmlTypePrivate::initEnums(), ok, Q_ASSERT, and QStringHash< T >::value().
QQmlType::ExtensionFunc QQmlType::extensionFunction | ( | ) | const |
Definition at line 569 of file qqmltype.cpp.
References CppType, QQmlTypePrivate::extraData::cppTypeData, QQmlTypePrivate::QQmlCppTypeData::extFunc, QQmlTypePrivate::QQmlSingletonTypeData::extFunc, QQmlTypePrivate::extraData, QQmlTypePrivate::regType, SingletonType, and QQmlTypePrivate::extraData::singletonTypeData.
const QMetaObject * QQmlType::extensionMetaObject | ( | ) | const |
Definition at line 584 of file qqmltype.cpp.
References CppType, QQmlTypePrivate::extraData::cppTypeData, QQmlTypePrivate::QQmlCppTypeData::extMetaObject, QQmlTypePrivate::QQmlSingletonTypeData::extMetaObject, QQmlTypePrivate::extraData, QQmlTypePrivate::regType, SingletonType, and QQmlTypePrivate::extraData::singletonTypeData.
Referenced by QV4::ResolvedTypeReference::createPropertyCache(), and QQmlMetaType::metaObjectForValueType().
int QQmlType::finalizerCast | ( | ) | const |
Definition at line 720 of file qqmltype.cpp.
References CppType, QQmlTypePrivate::extraData::cppTypeData, QQmlTypePrivate::extraData, QQmlTypePrivate::QQmlCppTypeData::finalizerCast, and QQmlTypePrivate::regType.
int QQmlType::index | ( | ) | const |
Definition at line 734 of file qqmltype.cpp.
References QQmlTypePrivate::index.
Referenced by QQmlPrivate::qmlregister(), and QQmlMetaType::typeId().
const char * QQmlType::interfaceIId | ( | ) | const |
Definition at line 727 of file qqmltype.cpp.
References QQmlTypePrivate::extraData, InterfaceType, QQmlTypePrivate::extraData::interfaceTypeData, and QQmlTypePrivate::regType.
bool QQmlType::isComposite | ( | ) | const |
Definition at line 614 of file qqmltype.cpp.
References QQmlTypePrivate::isComposite().
Referenced by QV4::Function::Function(), QQmlPropertyCacheCreator< ObjectContainer >::createMetaObject(), QQmlPropertyCacheCreator< ObjectContainer >::metaTypeForParameter(), and QQmlImports::resolveType().
bool QQmlType::isCompositeSingleton | ( | ) | const |
Definition at line 619 of file qqmltype.cpp.
References CompositeSingletonType, isInlineComponentType(), and QQmlTypePrivate::regType.
Referenced by QQmlImports::resolveType().
bool QQmlType::isCreatable | ( | ) | const |
Definition at line 564 of file qqmltype.cpp.
References CppType, QQmlTypePrivate::extraData::cppTypeData, QQmlTypePrivate::extraData, QQmlTypePrivate::QQmlCppTypeData::newFunc, and QQmlTypePrivate::regType.
Referenced by create().
bool QQmlType::isExtendedType | ( | ) | const |
Definition at line 599 of file qqmltype.cpp.
References QQmlTypePrivate::ProxyMetaObjects::data, QQmlTypePrivate::init(), and QList< T >::isEmpty().
bool QQmlType::isInlineComponentType | ( | ) | const |
Definition at line 739 of file qqmltype.cpp.
References InlineComponentType, and QQmlTypePrivate::regType.
Referenced by QV4::Function::Function(), QV4::ResolvedTypeReference::addToHash(), QQmlPropertyCacheCreator< ObjectContainer >::createMetaObject(), isCompositeSingleton(), QQmlPropertyCacheCreator< ObjectContainer >::metaTypeForParameter(), and QQmlImports::resolveType().
bool QQmlType::isInterface | ( | ) | const |
Definition at line 609 of file qqmltype.cpp.
References InterfaceType, and QQmlTypePrivate::regType.
bool QQmlType::isQJSValueSingleton | ( | ) | const |
bool QQmlType::isQObjectSingleton | ( | ) | const |
bool QQmlType::isSequentialContainer | ( | ) | const |
Definition at line 638 of file qqmltype.cpp.
References QQmlTypePrivate::regType, and SequentialContainerType.
Referenced by QV4::coerceListType(), QV4::ExecutionEngine::fromData(), QV4::SequencePrototype::fromVariant(), listMetaSequence(), QV4::loadProperty(), QQmlVMEMetaObject::metaCall(), and QV4::Heap::Sequence::setVariant().
bool QQmlType::isSingleton | ( | ) | const |
Definition at line 604 of file qqmltype.cpp.
References CompositeSingletonType, QQmlTypePrivate::regType, and SingletonType.
|
inline |
Definition at line 58 of file qqmltype_p.h.
References d.
Referenced by QV4::Function::Function(), QV4::ResolvedTypeReference::addToHash(), QQmlComponentPrivate::beginCreate(), QQmlComponentPrivate::completeCreate(), QQmlPropertyCacheCreator< ObjectContainer >::createMetaObject(), QV4::ResolvedTypeReference::createPropertyCache(), QV4::ResolvedTypeReference::doDynamicTypeCheck(), QV4::ResolvedTypeReference::propertyCache(), QQmlMetaTypeData::propertyCache(), QQmlPropertyCacheCreator< ObjectContainer >::propertyCacheForObject(), QQmlPrivate::qmlregister(), qmltcCreateDynamicMetaObject(), QQmlImports::resolveType(), and QQmlImportInstance::resolveType().
QMetaSequence QQmlType::listMetaSequence | ( | ) | const |
Definition at line 653 of file qqmltype.cpp.
References QQmlTypePrivate::extraData, isSequentialContainer(), and QQmlTypePrivate::extraData::sequentialContainerTypeData.
Referenced by QV4::coerceListType(), QV4::ExecutionEngine::fromData(), QV4::SequencePrototype::fromVariant(), QV4::loadProperty(), and QV4::Heap::Sequence::setVariant().
const QMetaObject * QQmlType::metaObject | ( | ) | const |
Definition at line 658 of file qqmltype.cpp.
References QQmlTypePrivate::baseMetaObject, QList< T >::constFirst(), QQmlTypePrivate::ProxyMetaObjects::data, QQmlTypePrivate::init(), QList< T >::isEmpty(), and QQmlProxyMetaObject::ProxyData::metaObject.
Referenced by QV4::ResolvedTypeReference::createPropertyCache(), QV4::ResolvedTypeReference::doDynamicTypeCheck(), QQmlMetaType::metaObjectForType(), QQmlMetaType::metaObjectForValueType(), and QQmlCustomParser::resolveType().
QTypeRevision QQmlType::metaObjectRevision | ( | ) | const |
Definition at line 680 of file qqmltype.cpp.
References QQmlTypePrivate::revision.
Referenced by QQmlMetaTypeData::propertyCache().
QHashedString QQmlType::module | ( | ) | const |
Definition at line 105 of file qqmltype.cpp.
References QQmlTypePrivate::module.
Referenced by QV4::ResolvedTypeReference::addToHash(), and availableInVersion().
QString QQmlType::noCreationReason | ( | ) | const |
Definition at line 557 of file qqmltype.cpp.
References CppType, QQmlTypePrivate::extraData::cppTypeData, QQmlTypePrivate::extraData, QQmlTypePrivate::QQmlCppTypeData::noCreationReason, and QQmlTypePrivate::regType.
|
inline |
int QQmlType::parserStatusCast | ( | ) | const |
Definition at line 699 of file qqmltype.cpp.
References CppType, QQmlTypePrivate::extraData::cppTypeData, QQmlTypePrivate::extraData, QQmlTypePrivate::QQmlCppTypeData::parserStatusCast, and QQmlTypePrivate::regType.
|
inline |
Definition at line 145 of file qqmltype_p.h.
References d.
Referenced by derefHandle(), refCount(), and refHandle().
int QQmlType::propertyValueInterceptorCast | ( | ) | const |
Definition at line 713 of file qqmltype.cpp.
References CppType, QQmlTypePrivate::extraData::cppTypeData, QQmlTypePrivate::extraData, QQmlTypePrivate::QQmlCppTypeData::propertyValueInterceptorCast, and QQmlTypePrivate::regType.
int QQmlType::propertyValueSourceCast | ( | ) | const |
Definition at line 706 of file qqmltype.cpp.
References CppType, QQmlTypePrivate::extraData::cppTypeData, QQmlTypePrivate::extraData, QQmlTypePrivate::QQmlCppTypeData::propertyValueSourceCast, and QQmlTypePrivate::regType.
QMetaType QQmlType::qListTypeId | ( | ) | const |
Definition at line 648 of file qqmltype.cpp.
References QQmlTypePrivate::listId.
Referenced by QV4::coerceListType(), QQmlPropertyCacheCreator< ObjectContainer >::createMetaObject(), QQmlPropertyCacheCreator< ObjectContainer >::metaTypeForParameter(), and QV4::Heap::Sequence::setVariant().
QString QQmlType::qmlTypeName | ( | ) | const |
Definition at line 449 of file qqmltype.cpp.
References QQmlTypePrivate::name.
Referenced by QQuickDesignerSupportMetaInfo::isSubclassOf(), and QQmlDebugTranslationServicePrivate::sendTranslatableTextOccurrences().
|
static |
Definition at line 906 of file qqmltype.cpp.
References QQmlRefCount::count(), and priv().
|
static |
Definition at line 894 of file qqmltype.cpp.
References QQmlRefCount::addref(), and priv().
Referenced by QV4::QQmlTypeWrapper::create(), QV4::QQmlTypeWrapper::virtualGet(), and QV4::QQmlTypeWrapper::virtualResolveLookupGetter().
int QQmlType::scopedEnumIndex | ( | QQmlEnginePrivate * | engine, |
const QString & | name, | ||
bool * | ok | ||
) | const |
Definition at line 804 of file qqmltype.cpp.
References engine, QQmlTypePrivate::initEnums(), ok, Q_ASSERT, QQmlTypePrivate::Enums::scopedEnumIndex, and QStringHash< T >::value().
int QQmlType::scopedEnumIndex | ( | QQmlEnginePrivate * | engine, |
const QV4::String * | name, | ||
bool * | ok | ||
) | const |
Definition at line 790 of file qqmltype.cpp.
References engine, QQmlTypePrivate::initEnums(), ok, Q_ASSERT, QQmlTypePrivate::Enums::scopedEnumIndex, and QStringHash< T >::value().
int QQmlType::scopedEnumValue | ( | QQmlEnginePrivate * | engine, |
const QByteArray & | scopedEnumName, | ||
const QByteArray & | name, | ||
bool * | ok | ||
) | const |
Definition at line 850 of file qqmltype.cpp.
References QList< T >::at(), QByteArray::constData(), engine, QQmlTypePrivate::initEnums(), ok, Q_ASSERT, QQmlTypePrivate::Enums::scopedEnumIndex, QQmlTypePrivate::Enums::scopedEnums, QByteArray::size(), and QStringHash< T >::value().
int QQmlType::scopedEnumValue | ( | QQmlEnginePrivate * | engine, |
int | index, | ||
const QString & | name, | ||
bool * | ok | ||
) | const |
Definition at line 834 of file qqmltype.cpp.
References QList< T >::at(), engine, QQmlTypePrivate::initEnums(), ok, Q_ASSERT, QQmlTypePrivate::Enums::scopedEnums, and QStringHash< T >::value().
int QQmlType::scopedEnumValue | ( | QQmlEnginePrivate * | engine, |
int | index, | ||
const QV4::String * | name, | ||
bool * | ok | ||
) | const |
Definition at line 818 of file qqmltype.cpp.
References QList< T >::at(), engine, QQmlTypePrivate::initEnums(), ok, Q_ASSERT, QQmlTypePrivate::Enums::scopedEnums, and QStringHash< T >::value().
int QQmlType::scopedEnumValue | ( | QQmlEnginePrivate * | engine, |
QStringView | scopedEnumName, | ||
QStringView | name, | ||
bool * | ok | ||
) | const |
Definition at line 873 of file qqmltype.cpp.
References QList< T >::at(), engine, QQmlTypePrivate::initEnums(), ok, Q_ASSERT, QQmlTypePrivate::Enums::scopedEnumIndex, QQmlTypePrivate::Enums::scopedEnums, and QStringHash< T >::value().
QQmlType::SingletonInstanceInfo * QQmlType::singletonInstanceInfo | ( | ) | const |
Definition at line 511 of file qqmltype.cpp.
References CompositeSingletonType, QQmlTypePrivate::extraData, QQmlTypePrivate::regType, QQmlTypePrivate::QQmlSingletonTypeData::singletonInstanceInfo, SingletonType, and QQmlTypePrivate::extraData::singletonTypeData.
QUrl QQmlType::sourceUrl | ( | ) | const |
Definition at line 743 of file qqmltype.cpp.
References QQmlTypePrivate::sourceUrl().
Referenced by QV4::Function::Function(), QQmlPropertyCacheCreator< ObjectContainer >::createMetaObject(), QQmlPrivate::AOTCompiledContext::loadTypeLookup(), QQmlPropertyCacheCreator< ObjectContainer >::metaTypeForParameter(), QQmlMetaType::removeFromInlineComponents(), and QQmlImports::resolveType().
QMetaType QQmlType::typeId | ( | ) | const |
Definition at line 643 of file qqmltype.cpp.
References QQmlTypePrivate::typeId.
Referenced by QV4::Function::Function(), QV4::coerce(), QV4::coerceListType(), QQmlPropertyCacheCreator< ObjectContainer >::createMetaObject(), createOrConstructValueType(), QQmlTypeData::done(), QQmlValueTypeProvider::heapCreateValueType(), QQmlPrivate::AOTCompiledContext::loadTypeLookup(), and QQmlPropertyCacheCreator< ObjectContainer >::metaTypeForParameter().
QByteArray QQmlType::typeName | ( | ) | const |
Definition at line 431 of file qqmltype.cpp.
References QQmlTypePrivate::baseMetaObject, QMetaObject::className(), CompositeSingletonType, QQmlTypePrivate::extraData, QQmlTypePrivate::regType, QQmlTypePrivate::QQmlSingletonTypeData::singletonInstanceInfo, SingletonType, QQmlTypePrivate::extraData::singletonTypeData, QString::toUtf8(), and QQmlType::SingletonInstanceInfo::typeName.
Referenced by QQmlImports::resolveType(), and QQmlDebugTranslationServicePrivate::sendTranslatableTextOccurrences().
QTypeRevision QQmlType::version | ( | ) | const |
Definition at line 112 of file qqmltype.cpp.
References QQmlTypePrivate::version.
Referenced by availableInVersion(), availableInVersion(), QQmlPropertyCacheCreator< ObjectContainer >::createMetaObject(), and findCompositeSingletons().
|
friend |
Definition at line 169 of file qqmltype_p.h.
|
friend |
Definition at line 164 of file qqmltype_p.h.