Skip to content

Commit

Permalink
Followup review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Jan 15, 2020
1 parent 9243bd2 commit 5dfb5f6
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
Expand Up @@ -23,6 +23,9 @@ This class implements a resolution for problems detected in geometry checks.
QgsGeometryCheckResolutionMethod( int id, const QString &name, const QString &description, bool isStable = true );

int id() const;
%Docstring
An id that is unique per check. This will be used to trigger resolutions.
%End

bool isStable() const;
%Docstring
Expand Down
2 changes: 2 additions & 0 deletions src/analysis/vector/geometry_checker/qgsgeometrycheck.cpp
Expand Up @@ -59,6 +59,8 @@ void QgsGeometryCheck::fixError( const QMap<QString, QgsFeaturePool *> &featureP
QList<QgsGeometryCheckResolutionMethod> QgsGeometryCheck::availableResolutionMethods() const
{
QList<QgsGeometryCheckResolutionMethod> fixes;
// Once the deprecated `resolutionMethods()` function is gone, this default implementation
// should be removed and each check will need to implement this method instead of resolutionMethods().
Q_NOWARN_DEPRECATED_PUSH
const QStringList methods = resolutionMethods();
Q_NOWARN_DEPRECATED_POP
Expand Down
Expand Up @@ -16,11 +16,11 @@
#include "qgsgeometrycheckresolutionmethod.h"

QgsGeometryCheckResolutionMethod::QgsGeometryCheckResolutionMethod( int id, const QString &name, const QString &description, bool isStable )
: mId( id )
, mIsStable( isStable )
, mName( name )
, mDescription( description )
{
mId = id;
mName = name;
mDescription = description;
mIsStable = isStable;
}

int QgsGeometryCheckResolutionMethod::id() const
Expand Down
Expand Up @@ -29,6 +29,9 @@ class ANALYSIS_EXPORT QgsGeometryCheckResolutionMethod
public:
QgsGeometryCheckResolutionMethod( int id, const QString &name, const QString &description, bool isStable = true );

/**
* An id that is unique per check. This will be used to trigger resolutions.
*/
int id() const;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/vector/geometry_checker/qgsgeometrygapcheck.h
Expand Up @@ -95,9 +95,9 @@ class ANALYSIS_EXPORT QgsGeometryGapCheck : public QgsGeometryCheck
{
MergeLongestEdge, //!< Merge the gap with the polygon with the longest shared edge.
NoChange, //!< Do not handle the error.
AddToAllowedGaps, //!< Add gap geometry to allowed gaps layer
CreateNewFeature, //!< Create a new feature with the gap geometry
MergeLargestArea, //!< Merge with neighbouring polygon with largest area
AddToAllowedGaps, //!< Add gap geometry to allowed gaps layer
};
Q_ENUM( ResolutionMethod )

Expand Down

0 comments on commit 5dfb5f6

Please sign in to comment.