forked from qt-creator/qt-creator
QmlDesigner: Use constexpr array in PropertyEditorQmlBackend
Change-Id: Ibee7692ba9adf4bd92a9ad35deaf7b24c8cc35bc Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -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,
|
||||||
|
Reference in New Issue
Block a user