Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#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) |
bool | operator== (const QQmlType &a, const QQmlType &b) noexcept |
bool | operator!= (const QQmlType &a, const QQmlType &b) noexcept |
Definition at line 43 of file qqmltype_p.h.
Definition at line 76 of file qqmltype_p.h.
Definition at line 66 of file qqmltype_p.h.
Definition at line 82 of file qqmltype_p.h.
Enumerator | |
---|---|
CppType | |
SingletonType | |
InterfaceType | |
CompositeType | |
CompositeSingletonType | |
InlineComponentType | |
SequentialContainerType | |
AnyRegistrationType |
Definition at line 159 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 709 of file qqmltype.cpp.
References QQmlTypePrivate::attachedPropertiesBase(), base, and engine.
Referenced by QQmlBindPrivate::decodeBinding().
const QMetaObject * QQmlType::attachedPropertiesType | ( | QQmlEnginePrivate * | engine | ) | const |
Definition at line 716 of file qqmltype.cpp.
References QQmlTypePrivate::attachedPropertiesBase(), base, and engine.
bool QQmlType::availableInVersion | ( | const QHashedStringRef & | module, |
QTypeRevision | version ) const |
Definition at line 133 of file qqmltype.cpp.
References availableInVersion(), 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 694 of file qqmltype.cpp.
References QQmlTypePrivate::baseMetaObject.
bool QQmlType::canConstructValueType | ( | ) | const |
Definition at line 556 of file qqmltype.cpp.
References CppType, QQmlTypePrivate::extraData, and QQmlTypePrivate::regType.
Referenced by createOrConstructValueType(), and createOrConstructValueType().
bool QQmlType::canPopulateValueType | ( | ) | const |
Definition at line 563 of file qqmltype.cpp.
References CppType, QQmlTypePrivate::extraData, and QQmlTypePrivate::regType.
Referenced by createOrConstructValueType(), and createOrConstructValueType().
bool QQmlType::containsRevisionedAttributes | ( | ) | const |
Definition at line 699 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 482 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 500 of file qqmltype.cpp.
References createProxy(), QQmlTypePrivate::extraData, and isCreatable().
QQmlType::CreateFunc QQmlType::createFunction | ( | ) | const |
Definition at line 570 of file qqmltype.cpp.
References CppType, QQmlTypePrivate::extraData, and QQmlTypePrivate::regType.
Definition at line 831 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 549 of file qqmltype.cpp.
References CppType, 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 518 of file qqmltype.cpp.
References create(), QQmlData::DoesNotOwnMemory, QObjectPrivate::get(), and Q_ASSERT.
Referenced by QQmlComponentPrivate::beginCreate().
QQmlCustomParser * QQmlType::customParser | ( | ) | const |
Definition at line 540 of file qqmltype.cpp.
References CppType, QQmlTypePrivate::extraData, and QQmlTypePrivate::regType.
|
static |
Definition at line 818 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 462 of file qqmltype.cpp.
References QQmlTypePrivate::elementName.
int QQmlType::enumValue | ( | QQmlEnginePrivate * | engine, |
const QHashedCStringRef & | name, | ||
bool * | ok ) const |
Definition at line 777 of file qqmltype.cpp.
References engine, QQmlTypePrivate::enumValue(), and ok.
int QQmlType::enumValue | ( | QQmlEnginePrivate * | engine, |
const QHashedStringRef & | name, | ||
bool * | ok ) const |
Definition at line 772 of file qqmltype.cpp.
References engine, QQmlTypePrivate::enumValue(), and ok.
int QQmlType::enumValue | ( | QQmlEnginePrivate * | engine, |
const QV4::String * | name, | ||
bool * | ok ) const |
Definition at line 782 of file qqmltype.cpp.
References engine, QQmlTypePrivate::enumValue(), and ok.
QQmlType::ExtensionFunc QQmlType::extensionFunction | ( | ) | const |
Definition at line 589 of file qqmltype.cpp.
References CppType, QQmlTypePrivate::extraData, QQmlTypePrivate::regType, and SingletonType.
const QMetaObject * QQmlType::extensionMetaObject | ( | ) | const |
Definition at line 604 of file qqmltype.cpp.
References CppType, QQmlTypePrivate::extraData, QQmlTypePrivate::regType, and SingletonType.
Referenced by QV4::ResolvedTypeReference::createPropertyCache().
int QQmlType::finalizerCast | ( | ) | const |
Definition at line 744 of file qqmltype.cpp.
References CppType, QQmlTypePrivate::extraData, and QQmlTypePrivate::regType.
Referenced by QQmlComponentPrivate::beginCreate().
int QQmlType::index | ( | ) | const |
Definition at line 758 of file qqmltype.cpp.
References QQmlTypePrivate::index.
Referenced by QQmlMetaType::typeId().
const char * QQmlType::interfaceIId | ( | ) | const |
Definition at line 751 of file qqmltype.cpp.
References QQmlTypePrivate::extraData, InterfaceType, and QQmlTypePrivate::regType.
bool QQmlType::isComposite | ( | ) | const |
Definition at line 634 of file qqmltype.cpp.
References QQmlTypePrivate::isComposite().
bool QQmlType::isCompositeSingleton | ( | ) | const |
Definition at line 639 of file qqmltype.cpp.
References CompositeSingletonType, isInlineComponentType(), and QQmlTypePrivate::regType.
bool QQmlType::isCreatable | ( | ) | const |
Definition at line 584 of file qqmltype.cpp.
References CppType, QQmlTypePrivate::extraData, and QQmlTypePrivate::regType.
Referenced by create().
bool QQmlType::isExtendedType | ( | ) | const |
Definition at line 619 of file qqmltype.cpp.
References QQmlTypePrivate::ProxyMetaObjects::data, QQmlTypePrivate::init(), and QList< T >::isEmpty().
bool QQmlType::isInlineComponentType | ( | ) | const |
Definition at line 763 of file qqmltype.cpp.
References InlineComponentType, and QQmlTypePrivate::regType.
Referenced by QV4::ResolvedTypeReference::addToHash(), and isCompositeSingleton().
bool QQmlType::isInterface | ( | ) | const |
Definition at line 629 of file qqmltype.cpp.
References InterfaceType, and QQmlTypePrivate::regType.
bool QQmlType::isQJSValueSingleton | ( | ) | const |
Definition at line 653 of file qqmltype.cpp.
References QQmlTypePrivate::extraData, QQmlTypePrivate::regType, and SingletonType.
bool QQmlType::isQObjectSingleton | ( | ) | const |
Definition at line 648 of file qqmltype.cpp.
References QQmlTypePrivate::extraData, QQmlTypePrivate::regType, and SingletonType.
bool QQmlType::isSequentialContainer | ( | ) | const |
Definition at line 658 of file qqmltype.cpp.
References QQmlTypePrivate::regType, and SequentialContainerType.
Referenced by QV4::coerceListType(), QV4::ExecutionEngine::fromData(), QV4::SequencePrototype::fromVariant(), listMetaSequence(), and QV4::loadProperty().
bool QQmlType::isSingleton | ( | ) | const |
Definition at line 624 of file qqmltype.cpp.
References CompositeSingletonType, QQmlTypePrivate::regType, and SingletonType.
|
inline |
Definition at line 54 of file qqmltype_p.h.
References d.
Referenced by QV4::ResolvedTypeReference::addToHash(), QQmlComponentPrivate::beginCreate(), QQmlComponentPrivate::completeCreate(), QV4::ResolvedTypeReference::createPropertyCache(), QQmlBindPrivate::decodeBinding(), QV4::ResolvedTypeReference::doDynamicTypeCheck(), QV4::ResolvedTypeReference::propertyCache(), QQmlMetaTypeData::propertyCache(), qmltcCreateDynamicMetaObject(), and QQmlImportInstance::resolveType().
bool QQmlType::isValueType | ( | ) | const |
Definition at line 663 of file qqmltype.cpp.
References QQmlTypePrivate::isValueType().
QMetaSequence QQmlType::listMetaSequence | ( | ) | const |
Definition at line 678 of file qqmltype.cpp.
References QQmlTypePrivate::extraData, and isSequentialContainer().
Referenced by QV4::coerceListType(), QV4::ExecutionEngine::fromData(), QV4::SequencePrototype::fromVariant(), and QV4::loadProperty().
const QMetaObject * QQmlType::metaObject | ( | ) | const |
Definition at line 683 of file qqmltype.cpp.
References QQmlTypePrivate::metaObject().
Referenced by QV4::ResolvedTypeReference::createPropertyCache(), QV4::ResolvedTypeReference::doDynamicTypeCheck(), QV4::QQmlTypeWrapper::metaObject(), QQmlMetaType::metaObjectForType(), and QQmlCustomParser::resolveType().
const QMetaObject * QQmlType::metaObjectForValueType | ( | ) | const |
Definition at line 688 of file qqmltype.cpp.
References QQmlTypePrivate::metaObjectForValueType(), and Q_ASSERT.
Referenced by QV4::coerce(), createOrConstructValueType(), and createOrConstructValueType().
QTypeRevision QQmlType::metaObjectRevision | ( | ) | const |
Definition at line 704 of file qqmltype.cpp.
References QQmlTypePrivate::revision.
Referenced by QQmlMetaTypeData::propertyCache().
QHashedString QQmlType::module | ( | ) | const |
Definition at line 105 of file qqmltype.cpp.
Referenced by QV4::ResolvedTypeReference::addToHash(), and availableInVersion().
QString QQmlType::noCreationReason | ( | ) | const |
Definition at line 577 of file qqmltype.cpp.
References CppType, QQmlTypePrivate::extraData, and QQmlTypePrivate::regType.
int QQmlType::parserStatusCast | ( | ) | const |
Definition at line 723 of file qqmltype.cpp.
References CppType, QQmlTypePrivate::extraData, and QQmlTypePrivate::regType.
Referenced by QQmlComponentPrivate::beginCreate().
|
inline |
Definition at line 154 of file qqmltype_p.h.
References d.
Referenced by derefHandle(), refCount(), and refHandle().
int QQmlType::propertyValueInterceptorCast | ( | ) | const |
Definition at line 737 of file qqmltype.cpp.
References CppType, QQmlTypePrivate::extraData, and QQmlTypePrivate::regType.
int QQmlType::propertyValueSourceCast | ( | ) | const |
Definition at line 730 of file qqmltype.cpp.
References CppType, QQmlTypePrivate::extraData, and QQmlTypePrivate::regType.
QMetaType QQmlType::qListTypeId | ( | ) | const |
Definition at line 673 of file qqmltype.cpp.
References QQmlTypePrivate::listId.
Referenced by QV4::coerceListType(), and QQmlPropertyCacheCreator< ObjectContainer >::metaTypeForParameter().
QString QQmlType::qmlTypeName | ( | ) | const |
Definition at line 469 of file qqmltype.cpp.
References QQmlTypePrivate::name.
Referenced by QQuickDesignerSupportMetaInfo::isSubclassOf(), and QQmlDebugTranslationServicePrivate::sendTranslatableTextOccurrences().
|
static |
Definition at line 824 of file qqmltype.cpp.
References QQmlRefCount::count(), and priv().
|
static |
Definition at line 812 of file qqmltype.cpp.
References QQmlRefCount::addref(), and priv().
Referenced by QV4::Heap::QQmlTypeWrapper::init(), QV4::QQmlTypeWrapper::virtualGet(), and QV4::QQmlTypeWrapper::virtualResolveLookupGetter().
int QQmlType::scopedEnumIndex | ( | QQmlEnginePrivate * | engine, |
const QString & | name, | ||
bool * | ok ) const |
Definition at line 792 of file qqmltype.cpp.
References engine, ok, and QQmlTypePrivate::scopedEnumIndex().
int QQmlType::scopedEnumIndex | ( | QQmlEnginePrivate * | engine, |
const QV4::String * | name, | ||
bool * | ok ) const |
Definition at line 787 of file qqmltype.cpp.
References engine, ok, and QQmlTypePrivate::scopedEnumIndex().
int QQmlType::scopedEnumValue | ( | QQmlEnginePrivate * | engine, |
const QHashedStringRef & | scopedEnumName, | ||
const QHashedStringRef & | name, | ||
bool * | ok ) const |
Definition at line 807 of file qqmltype.cpp.
References engine, ok, and QQmlTypePrivate::scopedEnumValue().
int QQmlType::scopedEnumValue | ( | QQmlEnginePrivate * | engine, |
int | index, | ||
const QString & | name, | ||
bool * | ok ) const |
Definition at line 802 of file qqmltype.cpp.
References engine, ok, and QQmlTypePrivate::scopedEnumValue().
int QQmlType::scopedEnumValue | ( | QQmlEnginePrivate * | engine, |
int | index, | ||
const QV4::String * | name, | ||
bool * | ok ) const |
Definition at line 797 of file qqmltype.cpp.
References engine, ok, and QQmlTypePrivate::scopedEnumValue().
QQmlType::SingletonInstanceInfo::ConstPtr QQmlType::singletonInstanceInfo | ( | ) | const |
Definition at line 531 of file qqmltype.cpp.
References CompositeSingletonType, QQmlTypePrivate::extraData, QQmlTypePrivate::regType, and SingletonType.
QUrl QQmlType::sourceUrl | ( | ) | const |
Definition at line 767 of file qqmltype.cpp.
References QQmlTypePrivate::sourceUrl().
Referenced by QQmlMetaType::removeFromInlineComponents().
QMetaType QQmlType::typeId | ( | ) | const |
Definition at line 668 of file qqmltype.cpp.
References QQmlTypePrivate::typeId.
Referenced by QV4::coerce(), QV4::coerceListType(), createOrConstructValueType(), QQmlTypeData::done(), QQmlValueTypeProvider::heapCreateValueType(), QV4::CompiledData::CompilationUnit::metaType(), and QQmlPropertyCacheCreator< ObjectContainer >::metaTypeForParameter().
QByteArray QQmlType::typeName | ( | ) | const |
Definition at line 451 of file qqmltype.cpp.
References QQmlTypePrivate::baseMetaObject, QMetaObject::className(), CompositeSingletonType, QQmlTypePrivate::extraData, QByteArray(), QQmlTypePrivate::regType, and SingletonType.
Referenced by QQmlBindPrivate::decodeBinding(), and QQmlDebugTranslationServicePrivate::sendTranslatableTextOccurrences().
QTypeRevision QQmlType::version | ( | ) | const |
Definition at line 112 of file qqmltype.cpp.
References QQmlTypePrivate::version.
Referenced by availableInVersion(), and availableInVersion().
Definition at line 179 of file qqmltype_p.h.
Definition at line 175 of file qqmltype_p.h.
|
friend |
Definition at line 187 of file qqmltype_p.h.
|
friend |
Definition at line 173 of file qqmltype_p.h.