From 3c5f3547fb65c26082bfd5322317d6798e394ce0 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Tue, 16 Jun 2020 17:05:35 +0200 Subject: [PATCH] QmlDesigner: Properly resolve "dot properties" for dynamic objects property NumberAnimation numberAnimation: NumberAnimation { } In this case this will expose the "dot properties" of numberAnimation. Change-Id: I40aafcc4f762ab6297c0829674ac62d92cbd713d Reviewed-by: Tim Jenssen --- .../designercore/metainfo/nodemetainfo.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp index 4abf7d28023..01817a97e63 100644 --- a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp +++ b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp @@ -88,11 +88,17 @@ static TypeName resolveTypeName(const ASTPropertyReference *ref, const ContextPt if (ref->ast()->propertyToken.isValid()) { type = ref->ast()->memberType->name.toUtf8(); - if (type == "alias") { - const Value *value = context->lookupReference(ref); + const Value *value = context->lookupReference(ref); - if (!value) - return type; + if (!value) + return type; + + if (const CppComponentValue * componentObjectValue = value->asCppComponentValue()) { + type = componentObjectValue->className().toUtf8(); + dotProperties = getObjectTypes(componentObjectValue, context); + } + + if (type == "alias") { if (const ASTObjectValue * astObjectValue = value->asAstObjectValue()) { if (astObjectValue->typeName()) {