mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-26 00:02:08 -05:00
Small code beautification
This commit is contained in:
parent
8cf0ef93c4
commit
2e9715386d
@ -81,7 +81,7 @@ QgsAttributeForm::QgsAttributeForm( QgsVectorLayer* vl, const QgsFeature &featur
|
||||
connect( vl, SIGNAL( selectionChanged() ), this, SLOT( layerSelectionChanged() ) );
|
||||
|
||||
// constraints management
|
||||
updateAllConstaints();
|
||||
updateAllConstraints();
|
||||
}
|
||||
|
||||
QgsAttributeForm::~QgsAttributeForm()
|
||||
@ -720,7 +720,7 @@ void QgsAttributeForm::onAttributeChanged( const QVariant& value )
|
||||
emit attributeChanged( eww->field().name(), value );
|
||||
}
|
||||
|
||||
void QgsAttributeForm::updateAllConstaints()
|
||||
void QgsAttributeForm::updateAllConstraints()
|
||||
{
|
||||
Q_FOREACH ( QgsWidgetWrapper* ww, mWidgets )
|
||||
{
|
||||
@ -740,8 +740,7 @@ void QgsAttributeForm::updateConstraints( QgsEditorWidgetWrapper *eww )
|
||||
eww->updateConstraint( ft );
|
||||
|
||||
// update eww dependencies constraint
|
||||
QList<QgsEditorWidgetWrapper*> deps;
|
||||
constraintDependencies( eww, deps );
|
||||
QList<QgsEditorWidgetWrapper*> deps = constraintDependencies( eww );
|
||||
|
||||
Q_FOREACH ( QgsEditorWidgetWrapper* depsEww, deps )
|
||||
depsEww->updateConstraint( ft );
|
||||
@ -925,9 +924,9 @@ void QgsAttributeForm::onConstraintStatusChanged( const QString& constraint,
|
||||
}
|
||||
}
|
||||
|
||||
void QgsAttributeForm::constraintDependencies( QgsEditorWidgetWrapper* w,
|
||||
QList<QgsEditorWidgetWrapper*>& wDeps )
|
||||
QList<QgsEditorWidgetWrapper*> QgsAttributeForm::constraintDependencies( QgsEditorWidgetWrapper* w )
|
||||
{
|
||||
QList<QgsEditorWidgetWrapper*> wDeps;
|
||||
QString name = w->field().name();
|
||||
|
||||
// for each widget in the current form
|
||||
@ -955,6 +954,8 @@ void QgsAttributeForm::constraintDependencies( QgsEditorWidgetWrapper* w,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return wDeps;
|
||||
}
|
||||
|
||||
void QgsAttributeForm::preventFeatureRefresh()
|
||||
|
@ -321,11 +321,11 @@ class GUI_EXPORT QgsAttributeForm : public QWidget
|
||||
QString createFilterExpression() const;
|
||||
|
||||
//! constraints management
|
||||
void updateAllConstaints();
|
||||
void updateAllConstraints();
|
||||
void updateConstraints( QgsEditorWidgetWrapper* w );
|
||||
bool currentFormFeature( QgsFeature& feature );
|
||||
bool currentFormValidConstraints( QStringList& invalidFields, QStringList& descriptions );
|
||||
void constraintDependencies( QgsEditorWidgetWrapper* w, QList<QgsEditorWidgetWrapper*>& wDeps );
|
||||
QList<QgsEditorWidgetWrapper*> constraintDependencies( QgsEditorWidgetWrapper* w );
|
||||
void clearInvalidConstraintsMessage();
|
||||
void displayInvalidConstraintMessage( const QStringList& invalidFields,
|
||||
const QStringList& description );
|
||||
|
Loading…
x
Reference in New Issue
Block a user