From 9bc9a4d3764b0f74d8c4ffcec513ec336ec1d94c Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Fri, 19 Feb 2021 19:43:18 +0100 Subject: [PATCH] QmlDesigner: Fix regression in template generation Fix property editor template generation for alias properties. Task-number: QDS-3740 Change-Id: I082e213a5f05a5ba35bb94d41924dcac81404c61 Reviewed-by: Thomas Hartmann --- .../propertyeditor/propertyeditorqmlbackend.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp index 1b0bc97ade0..609f4f45326 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp @@ -593,9 +593,12 @@ QString PropertyEditorQmlBackend::templateGeneration(const NodeMetaInfo &type, continue; // private API if (!superType.hasProperty(propertyName) - && type.propertyIsWritable(propertyName) - && dotPropertyHeuristic(node, type, propertyName)) { - const QString typeName = QString::fromLatin1(type.propertyTypeName(propertyName)); + && type.propertyIsWritable(propertyName) + && dotPropertyHeuristic(node, type, propertyName)) { + QString typeName = QString::fromLatin1(type.propertyTypeName(propertyName)); + + if (typeName == "alias" && node.isValid()) + typeName = QString::fromLatin1(node.instanceType(propertyName)); // Check if a template for the type exists if (allTypes.contains(typeName)) {