Skip to content
Permalink
Browse files
Small code beautification
  • Loading branch information
m-kuhn committed Sep 9, 2016
1 parent 8cf0ef9 commit 2e97153
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
@@ -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 );

0 comments on commit 2e97153

Please sign in to comment.