From cdfb4c6cb6c9de86dde784502b6352cb0f8ddfa4 Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Tue, 18 Sep 2018 14:24:41 +0200 Subject: [PATCH] QmlDesigner: no extra method necessary Change-Id: I1f088246936140112823e319bbf9ccfd58b0ec34 Reviewed-by: Tim Jenssen --- .../propertyeditor/propertyeditorqmlbackend.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp index 86b3ac91659..60723c9f34a 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp @@ -130,16 +130,6 @@ void PropertyEditorQmlBackend::setupPropertyEditorValue(const PropertyName &name } -static PropertyNameList layoutAttachedPropertiesNames() -{ - PropertyNameList propertyNames; - propertyNames << "alignment" << "column" << "columnSpan" << "fillHeight" << "fillWidth" - << "maximumHeight" << "maximumWidth" << "minimumHeight" << "minimumWidth" - << "preferredHeight" << "preferredWidth" << "row"<< "rowSpan"; - - return propertyNames; -} - QVariant properDefaultLayoutAttachedProperties(const QmlObjectNode &qmlObjectNode, const PropertyName &propertyName) { QVariant value = qmlObjectNode.modelValue(propertyName); @@ -169,7 +159,9 @@ void PropertyEditorQmlBackend::setupLayoutAttachedProperties(const QmlObjectNode { if (QmlItemNode(qmlObjectNode).isInLayout()) { - static const PropertyNameList propertyNames = layoutAttachedPropertiesNames(); + static const PropertyNameList propertyNames = + {"alignment", "column", "columnSpan", "fillHeight", "fillWidth", "maximumHeight", "maximumWidth", + "minimumHeight", "minimumWidth", "preferredHeight", "preferredWidth", "row", "rowSpan"}; foreach (const PropertyName &propertyName, propertyNames) { createPropertyEditorValue(qmlObjectNode, "Layout." + propertyName, properDefaultLayoutAttachedProperties(qmlObjectNode, propertyName), propertyEditor);