From 42fd3f8a60fb8c51668602f8aae00d7666715673 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Fri, 30 May 2025 04:12:10 +0200 Subject: [PATCH] QmlDesigner: Use constexpr array in PropertyEditorQmlBackend Change-Id: Ibee7692ba9adf4bd92a9ad35deaf7b24c8cc35bc Reviewed-by: Thomas Hartmann --- .../propertyeditorqmlbackend.cpp | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp index 5a4691bc707..11f3fe5b76a 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp @@ -221,11 +221,24 @@ QVariant properDefaultInsightAttachedProperties(const QmlObjectNode &qmlObjectNo void PropertyEditorQmlBackend::setupLayoutAttachedProperties(const QmlObjectNode &qmlObjectNode, PropertyEditorView *propertyEditor) { if (QmlItemNode(qmlObjectNode).isInLayout()) { - - static const PropertyNameList propertyNames = - {"alignment", "column", "columnSpan", "fillHeight", "fillWidth", "maximumHeight", "maximumWidth", - "minimumHeight", "minimumWidth", "preferredHeight", "preferredWidth", "row", "rowSpan", - "topMargin", "bottomMargin", "leftMargin", "rightMargin", "margins"}; + static constexpr PropertyNameView propertyNames[] = {"alignment", + "column", + "columnSpan", + "fillHeight", + "fillWidth", + "maximumHeight", + "maximumWidth", + "minimumHeight", + "minimumWidth", + "preferredHeight", + "preferredWidth", + "row", + "rowSpan", + "topMargin", + "bottomMargin", + "leftMargin", + "rightMargin", + "margins"}; for (PropertyNameView propertyName : propertyNames) { createPropertyEditorValue(qmlObjectNode,