Skip to content
Permalink
Browse files

Range-based for loop

  • Loading branch information
m-kuhn committed Sep 28, 2017
1 parent 67d2dd5 commit 8bef8d81a06ff411f7ae3bd6fd12195a44e38a6b
Showing with 9 additions and 8 deletions.
  1. +7 −6 src/app/qgsattributesformproperties.cpp
  2. +2 −2 src/app/qgsattributesformproperties.h
@@ -185,7 +185,7 @@ QgsAttributesFormProperties::FieldConfig QgsAttributesFormProperties::configForC
}


QTreeWidgetItem *QgsAttributesFormProperties::loadAttributeEditorTreeItem( QgsAttributeEditorElement *const widgetDef, QTreeWidgetItem *parent, DnDTree *mTree )
QTreeWidgetItem *QgsAttributesFormProperties::loadAttributeEditorTreeItem( QgsAttributeEditorElement *const widgetDef, QTreeWidgetItem *parent, DnDTree *tree )
{
QTreeWidgetItem *newWidget = nullptr;
switch ( widgetDef->type() )
@@ -194,7 +194,7 @@ QTreeWidgetItem *QgsAttributesFormProperties::loadAttributeEditorTreeItem( QgsAt
{
DnDTreeItemData itemData = DnDTreeItemData( DnDTreeItemData::Field, widgetDef->name() );
itemData.setShowLabel( widgetDef->showLabel() );
newWidget = mTree->addItem( parent, itemData );
newWidget = tree->addItem( parent, itemData );
break;
}

@@ -208,7 +208,7 @@ QTreeWidgetItem *QgsAttributesFormProperties::loadAttributeEditorTreeItem( QgsAt
relEdConfig.showUnlinkButton = relationEditor->showUnlinkButton();
itemData.setRelationEditorConfiguration( relEdConfig );

newWidget = mTree->addItem( parent, itemData );
newWidget = tree->addItem( parent, itemData );
break;
}

@@ -224,11 +224,12 @@ QTreeWidgetItem *QgsAttributesFormProperties::loadAttributeEditorTreeItem( QgsAt
itemData.setColumnCount( container->columnCount() );
itemData.setShowAsGroupBox( container->isGroupBox() );
itemData.setVisibilityExpression( container->visibilityExpression() );
newWidget = mTree->addItem( parent, itemData );
newWidget = tree->addItem( parent, itemData );

Q_FOREACH ( QgsAttributeEditorElement *wdg, container->children() )
const QList<QgsAttributeEditorElement *> children = container->children();
for ( QgsAttributeEditorElement *wdg : children )
{
loadAttributeEditorTreeItem( wdg, newWidget, mTree );
loadAttributeEditorTreeItem( wdg, newWidget, tree );
}
}
break;
@@ -163,8 +163,8 @@ class APP_EXPORT QgsAttributesFormProperties : public QWidget, private Ui_QgsAtt

void loadRelations();

void loadAttributeEditorTree(DnDTree *tree );
QTreeWidgetItem *loadAttributeEditorTreeItem(QgsAttributeEditorElement *const widgetDef, QTreeWidgetItem *parent, DnDTree *tree );
void loadAttributeEditorTree( DnDTree *tree );
QTreeWidgetItem *loadAttributeEditorTreeItem( QgsAttributeEditorElement *const widgetDef, QTreeWidgetItem *parent, DnDTree *tree );

protected:
void updateButtons();

0 comments on commit 8bef8d8

Please sign in to comment.
You can’t perform that action at this time.