diff options
Diffstat (limited to 'src/qml/qml/qqmlmetatype.cpp')
-rw-r--r-- | src/qml/qml/qqmlmetatype.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/qml/qml/qqmlmetatype.cpp b/src/qml/qml/qqmlmetatype.cpp index f801e9aeba..a8ec5d18f8 100644 --- a/src/qml/qml/qqmlmetatype.cpp +++ b/src/qml/qml/qqmlmetatype.cpp @@ -1102,13 +1102,6 @@ QString QQmlType::noCreationReason() const return d->extraData.cd->noCreationReason; } -int QQmlType::createSize() const -{ - if (!d || d->regType != CppType) - return 0; - return d->extraData.cd->allocationSize; -} - bool QQmlType::isCreatable() const { return d && d->regType == CppType && d->extraData.cd->newFunc; @@ -2172,11 +2165,14 @@ int QQmlMetaType::attachedPropertiesFuncId(QQmlEnginePrivate *engine, const QMet QMutexLocker lock(metaTypeDataLock()); QQmlMetaTypeData *data = metaTypeData(); - QQmlType type(data->metaObjectToType.value(mo)); - if (type.attachedPropertiesFunction(engine)) - return type.attachedPropertiesId(engine); - else - return -1; + for (auto it = data->metaObjectToType.constFind(mo), end = data->metaObjectToType.constEnd(); + it != end && it.key() == mo; ++it) { + const QQmlType type(it.value()); + if (type.attachedPropertiesFunction(engine)) + return type.attachedPropertiesId(engine); + } + + return -1; } QQmlAttachedPropertiesFunc QQmlMetaType::attachedPropertiesFuncById(QQmlEnginePrivate *engine, int id) |