diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-10-14 15:48:12 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-10-14 15:48:12 +0200 |
commit | 7063fefe4b5e866b27001bb9b911fc2f68034e40 (patch) | |
tree | 1ce35139475d83399572a3265414c2da3443a321 /src/qml/qml/qqmlobjectcreator.cpp | |
parent | f3446071da8357620d0c8593a04e3b4fbba88f21 (diff) | |
parent | 4f3379352a265bab00a7265f85ffc38a9ca4ffe4 (diff) |
Merge remote-tracking branch 'origin/5.6' into dev
Change-Id: I11ea57222ba5aa683b7bfd7735fbc1d2cf86e875
Diffstat (limited to 'src/qml/qml/qqmlobjectcreator.cpp')
-rw-r--r-- | src/qml/qml/qqmlobjectcreator.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp index 765437b423..f096dfeea9 100644 --- a/src/qml/qml/qqmlobjectcreator.cpp +++ b/src/qml/qml/qqmlobjectcreator.cpp @@ -706,7 +706,12 @@ bool QQmlObjectCreator::setPropertyBinding(const QQmlPropertyData *property, con QQmlCompiledData::TypeReference *tr = resolvedTypes.value(binding->propertyNameIndex); Q_ASSERT(tr); QQmlType *attachedType = tr->type; - const int id = attachedType->attachedPropertiesId(); + if (!attachedType) { + QQmlTypeNameCache::Result res = context->imports->query(stringAt(binding->propertyNameIndex)); + if (res.isValid()) + attachedType = res.type; + } + const int id = attachedType->attachedPropertiesId(QQmlEnginePrivate::get(engine)); QObject *qmlObject = qmlAttachedPropertiesObjectById(id, _qobject); if (!populateInstance(binding->value.objectIndex, qmlObject, qmlObject, /*value type property*/0)) return false; |