Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add configuration map to constructors of all tests
  • Loading branch information
3nids authored and m-kuhn committed Oct 15, 2018
1 parent 3817df6 commit 16481d2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Expand Up @@ -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;
Expand Down
Expand Up @@ -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
}
4 changes: 2 additions & 2 deletions src/app/qgsgeometryvalidationservice.cpp
Expand Up @@ -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()
Expand Down Expand Up @@ -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.