From 0d04bf95601a869bbb99ab2397454de22b548bb3 Mon Sep 17 00:00:00 2001 From: Ali Kianian Date: Mon, 4 Sep 2023 16:39:24 +0300 Subject: [PATCH] QmlDesigner: Prevent the dynamic property from being overwritten Change-Id: Ia0bd78e0b1293b6d61251a68d7b4cf4ee234603e Reviewed-by: Thomas Hartmann Reviewed-by: Marco Bubke Reviewed-by: Qt CI Patch Build Bot --- .../qmldesigner/designercore/model/qmltextgenerator.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/qmldesigner/designercore/model/qmltextgenerator.cpp b/src/plugins/qmldesigner/designercore/model/qmltextgenerator.cpp index e5721d21c32..1f01f63930f 100644 --- a/src/plugins/qmldesigner/designercore/model/qmltextgenerator.cpp +++ b/src/plugins/qmldesigner/designercore/model/qmltextgenerator.cpp @@ -265,8 +265,7 @@ QString QmlTextGenerator::propertyToQml(const AbstractProperty &property, int in + QString::fromUtf8(property.name()) + QStringLiteral(": ") + toQml(property, indentDepth); - } - if (property.isSignalDeclarationProperty()) { + } else if (property.isSignalDeclarationProperty()) { result = m_tabSettings.indentationString(0, indentDepth, 0) + "signal" + " " + QString::fromUtf8(property.name()) + " " + toQml(property, indentDepth); } else {