diff options
Diffstat (limited to 'src/qml/types/qqmlbind.cpp')
-rw-r--r-- | src/qml/types/qqmlbind.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/qml/types/qqmlbind.cpp b/src/qml/types/qqmlbind.cpp index cb2da29c10..1386c3ae39 100644 --- a/src/qml/types/qqmlbind.cpp +++ b/src/qml/types/qqmlbind.cpp @@ -780,14 +780,16 @@ void QQmlBindPrivate::decodeBinding( Q_ASSERT(typeReference); QQmlType attachedType = typeReference->type(); if (!attachedType.isValid()) { - const QQmlTypeNameCache::Result result - = deferredData->context->imports()->query(propertySuffix); - if (!result.isValid()) { - qmlWarning(q).nospace() - << "Unknown name " << propertySuffix << ". The binding is ignored."; - return; + if (QQmlTypeLoader *typeLoader = compilationUnit->engine->typeLoader()) { + const QQmlTypeNameCache::Result result + = deferredData->context->imports()->query(propertySuffix, typeLoader); + if (!result.isValid()) { + qmlWarning(q).nospace() + << "Unknown name " << propertySuffix << ". The binding is ignored."; + return; + } + attachedType = result.type; } - attachedType = result.type; } QQmlContext *context = qmlContext(q); |