aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/designercore
diff options
context:
space:
mode:
authorThomas Hartmann <thomas.hartmann@qt.io>2020-06-16 17:05:35 +0200
committerThomas Hartmann <thomas.hartmann@qt.io>2020-06-25 11:10:05 +0000
commit3c5f3547fb65c26082bfd5322317d6798e394ce0 (patch)
treefa6284118518b38b920c381579ed4e621cdedd45 /src/plugins/qmldesigner/designercore
parentf26c51d5626d0e2dbb1e3743c8993a744fdea832 (diff)
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 <tim.jenssen@qt.io>
Diffstat (limited to 'src/plugins/qmldesigner/designercore')
-rw-r--r--src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
index 4abf7d2802..01817a97e6 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()) {