mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-11 00:04:27 -04:00
Range-based for loop
This commit is contained in:
parent
67d2dd53bd
commit
8bef8d81a0
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user