QmlDesigner: Fix invalid section caption on complex properties

Custom generated sections for complex exposed local properties now
show the proper section caption instead of default "Title".

Fixes: QDS-15045
Change-Id: I9e4d5b9c7731eaecece16c6b187496748b755bee
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Miikka Heikkinen
2025-04-11 14:36:56 +03:00
parent a0f6adc12e
commit 83a68d04ae
2 changed files with 3 additions and 3 deletions

View File

@@ -128,7 +128,7 @@ QString PropertyComponentGenerator::generateComplexComponentText(Utils::SmallStr
static QString templateText = QStringLiteral(
R"xy(
Section {
caption: %1 - %2
caption: "%1 - %2"
anchors.left: parent.left
anchors.right: parent.right
leftPadding: 8

View File

@@ -223,7 +223,7 @@ TEST_F(PropertyComponentGenerator,
QString expectedText = QStringLiteral(
R"xy(
Section {
caption: foo - Foo
caption: "foo - Foo"
anchors.left: parent.left
anchors.right: parent.right
leftPadding: 8
@@ -256,7 +256,7 @@ TEST_F(PropertyComponentGenerator,
QString expectedText = QStringLiteral(
R"xy(
Section {
caption: foo - Foo
caption: "foo - Foo"
anchors.left: parent.left
anchors.right: parent.right
leftPadding: 8