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 <thomas.hartmann@qt.io>
This commit is contained in:
Henning Gruendl
2021-02-19 19:43:18 +01:00
committed by Henning Gründl
parent 4a8443ff81
commit 9bc9a4d376

View File

@@ -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)) {