QmlDesigner: Use constexpr array in PropertyEditorQmlBackend

Change-Id: Ibee7692ba9adf4bd92a9ad35deaf7b24c8cc35bc
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Marco Bubke
2025-05-30 04:12:10 +02:00
parent f40f909890
commit 42fd3f8a60

View File

@@ -221,11 +221,24 @@ QVariant properDefaultInsightAttachedProperties(const QmlObjectNode &qmlObjectNo
void PropertyEditorQmlBackend::setupLayoutAttachedProperties(const QmlObjectNode &qmlObjectNode, PropertyEditorView *propertyEditor) void PropertyEditorQmlBackend::setupLayoutAttachedProperties(const QmlObjectNode &qmlObjectNode, PropertyEditorView *propertyEditor)
{ {
if (QmlItemNode(qmlObjectNode).isInLayout()) { if (QmlItemNode(qmlObjectNode).isInLayout()) {
static constexpr PropertyNameView propertyNames[] = {"alignment",
static const PropertyNameList propertyNames = "column",
{"alignment", "column", "columnSpan", "fillHeight", "fillWidth", "maximumHeight", "maximumWidth", "columnSpan",
"minimumHeight", "minimumWidth", "preferredHeight", "preferredWidth", "row", "rowSpan", "fillHeight",
"topMargin", "bottomMargin", "leftMargin", "rightMargin", "margins"}; "fillWidth",
"maximumHeight",
"maximumWidth",
"minimumHeight",
"minimumWidth",
"preferredHeight",
"preferredWidth",
"row",
"rowSpan",
"topMargin",
"bottomMargin",
"leftMargin",
"rightMargin",
"margins"};
for (PropertyNameView propertyName : propertyNames) { for (PropertyNameView propertyName : propertyNames) {
createPropertyEditorValue(qmlObjectNode, createPropertyEditorValue(qmlObjectNode,