Skip to content
Permalink
Browse files

add configuration map to constructors of all tests

  • Loading branch information
3nids authored and m-kuhn committed Sep 24, 2018
1 parent 3817df6 commit 16481d203a255f15a6d18bab50a730a15daf9d0a
@@ -30,8 +30,6 @@ QList<QgsWkbTypes::GeometryType> QgsGeometryIsValidCheck::compatibleGeometryType

QList<QgsSingleGeometryCheckError *> QgsGeometryIsValidCheck::processGeometry( const QgsGeometry &geometry ) const
{
Q_UNUSED( configuration )

QVector<QgsGeometry::Error> errors;

QgsGeometry::ValidationMethod method = QgsGeometry::ValidatorQgisInternal;
@@ -27,5 +27,5 @@ bool QgsGeometrySliverPolygonCheck::checkThreshold( double layerToMapUnits, cons
{
return false;
}
return value > mCheckConfiguration.value( QStringLiteral( "thresholdMapUnits" ) ).toDouble(); // the sliver threshold is actually a map unit independent number, just abusing QgsGeometryAreaCheck::mThresholdMapUnits to store it
return value > mThreshold; // the sliver threshold is actually a map unit independent number, just abusing QgsGeometryAreaCheck::mThresholdMapUnits to store it
}
@@ -25,7 +25,7 @@ QgsGeometryValidationService::QgsGeometryValidationService( QgsProject *project
{
connect( project, &QgsProject::layersAdded, this, &QgsGeometryValidationService::onLayersAdded );
// TODO: should not provide a nullptr context
mIsValidGeometryCheck = new QgsIsValidGeometryCheck( nullptr );
mIsValidGeometryCheck = new QgsIsValidGeometryCheck( nullptr, QVariantMap() );
}

QgsGeometryValidationService::~QgsGeometryValidationService()
@@ -89,6 +89,6 @@ void QgsGeometryValidationService::processFeature( QgsVectorLayer *layer, QgsFea

QgsFeature feature = layer->getFeature( fid );
// TODO: this is a bit hardcore
const auto errors = mIsValidGeometryCheck->processGeometry( feature.geometry(), QVariantMap() );
const auto errors = mIsValidGeometryCheck->processGeometry( feature.geometry() );
// emit geometryCheckCompleted( layer, fid, errors );
}

0 comments on commit 16481d2

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