Skip to content
Permalink
Browse files

Remvoe Q_OBJECT macro from geometry checks

  • Loading branch information
m-kuhn committed Aug 18, 2018
1 parent 9c0e742 commit 37d0b7b01f455a30486e9fe9cba9b65697c9fe38
Showing with 32 additions and 73 deletions.
  1. +24 −23 src/analysis/CMakeLists.txt
  2. +0 −2 src/analysis/vector/geometry_checker/qgsgeometryanglecheck.h
  3. +0 −2 src/analysis/vector/geometry_checker/qgsgeometryareacheck.h
  4. +1 −1 src/analysis/vector/geometry_checker/qgsgeometrycheckerutils.cpp
  5. +6 −6 src/analysis/vector/geometry_checker/qgsgeometrycheckerutils.h
  6. +0 −2 src/analysis/vector/geometry_checker/qgsgeometrycontainedcheck.h
  7. +0 −2 src/analysis/vector/geometry_checker/qgsgeometrydanglecheck.h
  8. +0 −2 src/analysis/vector/geometry_checker/qgsgeometrydegeneratepolygoncheck.h
  9. +0 −2 src/analysis/vector/geometry_checker/qgsgeometryduplicatecheck.h
  10. +0 −2 src/analysis/vector/geometry_checker/qgsgeometryduplicatenodescheck.h
  11. +0 −2 src/analysis/vector/geometry_checker/qgsgeometryfollowboundariescheck.h
  12. +0 −2 src/analysis/vector/geometry_checker/qgsgeometrygapcheck.h
  13. +0 −2 src/analysis/vector/geometry_checker/qgsgeometryholecheck.h
  14. +0 −2 src/analysis/vector/geometry_checker/qgsgeometrylineintersectioncheck.h
  15. +0 −2 src/analysis/vector/geometry_checker/qgsgeometrylinelayerintersectioncheck.h
  16. +0 −2 src/analysis/vector/geometry_checker/qgsgeometrymultipartcheck.h
  17. +1 −1 src/analysis/vector/geometry_checker/qgsgeometryoverlapcheck.cpp
  18. +0 −2 src/analysis/vector/geometry_checker/qgsgeometryoverlapcheck.h
  19. +0 −2 src/analysis/vector/geometry_checker/qgsgeometrypointcoveredbylinecheck.h
  20. +0 −2 src/analysis/vector/geometry_checker/qgsgeometrypointinpolygoncheck.h
  21. +0 −2 src/analysis/vector/geometry_checker/qgsgeometrysegmentlengthcheck.h
  22. +0 −2 src/analysis/vector/geometry_checker/qgsgeometryselfcontactcheck.h
  23. +0 −2 src/analysis/vector/geometry_checker/qgsgeometryselfintersectioncheck.h
  24. +0 −2 src/analysis/vector/geometry_checker/qgsgeometrysliverpolygoncheck.h
  25. +0 −2 src/analysis/vector/geometry_checker/qgsgeometrytypecheck.h
@@ -171,29 +171,6 @@ SET(QGIS_ANALYSIS_MOC_HDRS

vector/geometry_checker/qgsfeaturepool.h
vector/geometry_checker/qgsgeometrychecker.h
vector/geometry_checker/qgsgeometryanglecheck.h
vector/geometry_checker/qgsgeometryareacheck.h
vector/geometry_checker/qgsgeometrychecker.h
vector/geometry_checker/qgsgeometrycheck.h
vector/geometry_checker/qgsgeometrycontainedcheck.h
vector/geometry_checker/qgsgeometrydanglecheck.h
vector/geometry_checker/qgsgeometrydegeneratepolygoncheck.h
vector/geometry_checker/qgsgeometryduplicatecheck.h
vector/geometry_checker/qgsgeometryduplicatenodescheck.h
vector/geometry_checker/qgsgeometryfollowboundariescheck.h
vector/geometry_checker/qgsgeometrygapcheck.h
vector/geometry_checker/qgsgeometryholecheck.h
vector/geometry_checker/qgsgeometrylineintersectioncheck.h
vector/geometry_checker/qgsgeometrylinelayerintersectioncheck.h
vector/geometry_checker/qgsgeometrymultipartcheck.h
vector/geometry_checker/qgsgeometryoverlapcheck.h
vector/geometry_checker/qgsgeometrypointcoveredbylinecheck.h
vector/geometry_checker/qgsgeometrypointinpolygoncheck.h
vector/geometry_checker/qgsgeometrysegmentlengthcheck.h
vector/geometry_checker/qgsgeometryselfcontactcheck.h
vector/geometry_checker/qgsgeometryselfintersectioncheck.h
vector/geometry_checker/qgsgeometrysliverpolygoncheck.h
vector/geometry_checker/qgsgeometrytypecheck.h
)

INCLUDE_DIRECTORIES(SYSTEM ${SPATIALITE_INCLUDE_DIR})
@@ -281,6 +258,30 @@ SET(QGIS_ANALYSIS_HDRS
network/qgsnetworkdistancestrategy.h
network/qgsgraphanalyzer.h
network/qgsvectorlayerdirector.h

vector/geometry_checker/qgsgeometryanglecheck.h
vector/geometry_checker/qgsgeometryareacheck.h
vector/geometry_checker/qgsgeometrychecker.h
vector/geometry_checker/qgsgeometrycheck.h
vector/geometry_checker/qgsgeometrycontainedcheck.h
vector/geometry_checker/qgsgeometrydanglecheck.h
vector/geometry_checker/qgsgeometrydegeneratepolygoncheck.h
vector/geometry_checker/qgsgeometryduplicatecheck.h
vector/geometry_checker/qgsgeometryduplicatenodescheck.h
vector/geometry_checker/qgsgeometryfollowboundariescheck.h
vector/geometry_checker/qgsgeometrygapcheck.h
vector/geometry_checker/qgsgeometryholecheck.h
vector/geometry_checker/qgsgeometrylineintersectioncheck.h
vector/geometry_checker/qgsgeometrylinelayerintersectioncheck.h
vector/geometry_checker/qgsgeometrymultipartcheck.h
vector/geometry_checker/qgsgeometryoverlapcheck.h
vector/geometry_checker/qgsgeometrypointcoveredbylinecheck.h
vector/geometry_checker/qgsgeometrypointinpolygoncheck.h
vector/geometry_checker/qgsgeometrysegmentlengthcheck.h
vector/geometry_checker/qgsgeometryselfcontactcheck.h
vector/geometry_checker/qgsgeometryselfintersectioncheck.h
vector/geometry_checker/qgsgeometrysliverpolygoncheck.h
vector/geometry_checker/qgsgeometrytypecheck.h
)

INCLUDE_DIRECTORIES(
@@ -22,8 +22,6 @@

class ANALYSIS_EXPORT QgsGeometryAngleCheck : public QgsGeometryCheck
{
Q_OBJECT

public:
QgsGeometryAngleCheck( QgsGeometryCheckerContext *context, double minAngle )
: QgsGeometryCheck( FeatureNodeCheck, {QgsWkbTypes::LineGeometry, QgsWkbTypes::PolygonGeometry}, context )
@@ -24,8 +24,6 @@ class QgsSurface;

class ANALYSIS_EXPORT QgsGeometryAreaCheck : public QgsGeometryCheck
{
Q_OBJECT

public:
QgsGeometryAreaCheck( QgsGeometryCheckerContext *context, double thresholdMapUnits )
: QgsGeometryCheck( FeatureCheck, {QgsWkbTypes::PolygonGeometry}, context )
@@ -47,7 +47,7 @@ namespace QgsGeometryCheckerUtils

/////////////////////////////////////////////////////////////////////////////

LayerFeatures::iterator::iterator( const QList<QString>::iterator &layerIt, LayerFeatures *parent )
LayerFeatures::iterator::iterator( const QStringList::const_iterator &layerIt, const LayerFeatures *parent )
: mLayerIt( layerIt )
, mFeatureIt( QgsFeatureIds::const_iterator() )
, mParent( parent )
@@ -66,7 +66,7 @@ namespace QgsGeometryCheckerUtils
class iterator
{
public:
iterator( const QList<QString>::iterator &layerIt, LayerFeatures *parent );
iterator( const QList<QString>::const_iterator &layerIt, const LayerFeatures *parent );
~iterator();
const iterator &operator++();
iterator operator++( int ) { iterator tmp( *this ); ++*this; return tmp; }
@@ -77,14 +77,14 @@ namespace QgsGeometryCheckerUtils
bool nextLayerFeature( bool begin );
bool nextLayer( bool begin );
bool nextFeature( bool begin );
QList<QString>::iterator mLayerIt;
QList<QString>::const_iterator mLayerIt;
QgsFeatureIds::const_iterator mFeatureIt;
LayerFeatures *mParent;
LayerFeature *mCurrentFeature = nullptr;
const LayerFeatures *mParent;
const LayerFeature *mCurrentFeature = nullptr;
};

iterator begin() { return iterator( mLayerIds.begin(), this ); }
iterator end() { return iterator( mLayerIds.end(), this ); }
iterator begin() const { return iterator( mLayerIds.constBegin(), this ); }
iterator end() const { return iterator( mLayerIds.end(), this ); }
private:
QMap<QString, QgsFeaturePool *> mFeaturePools;
QMap<QString, QgsFeatureIds> mFeatureIds;
@@ -48,8 +48,6 @@ class ANALYSIS_EXPORT QgsGeometryContainedCheckError : public QgsGeometryCheckEr

class ANALYSIS_EXPORT QgsGeometryContainedCheck : public QgsGeometryCheck
{
Q_OBJECT

public:
explicit QgsGeometryContainedCheck( QgsGeometryCheckerContext *context )
: QgsGeometryCheck( FeatureCheck, {QgsWkbTypes::PointGeometry, QgsWkbTypes::LineGeometry, QgsWkbTypes::PolygonGeometry}, context ) {}
@@ -22,8 +22,6 @@

class ANALYSIS_EXPORT QgsGeometryDangleCheck : public QgsGeometryCheck
{
Q_OBJECT

public:
QgsGeometryDangleCheck( QgsGeometryCheckerContext *context )
: QgsGeometryCheck( FeatureNodeCheck, {QgsWkbTypes::LineGeometry}, context )
@@ -22,8 +22,6 @@

class ANALYSIS_EXPORT QgsGeometryDegeneratePolygonCheck : public QgsGeometryCheck
{
Q_OBJECT

public:
explicit QgsGeometryDegeneratePolygonCheck( QgsGeometryCheckerContext *context )
: QgsGeometryCheck( FeatureNodeCheck, {QgsWkbTypes::PolygonGeometry}, context ) {}
@@ -49,8 +49,6 @@ class ANALYSIS_EXPORT QgsGeometryDuplicateCheckError : public QgsGeometryCheckEr

class ANALYSIS_EXPORT QgsGeometryDuplicateCheck : public QgsGeometryCheck
{
Q_OBJECT

public:
explicit QgsGeometryDuplicateCheck( QgsGeometryCheckerContext *context )
: QgsGeometryCheck( FeatureCheck, {QgsWkbTypes::PointGeometry, QgsWkbTypes::LineGeometry, QgsWkbTypes::PolygonGeometry}, context ) {}
@@ -22,8 +22,6 @@

class ANALYSIS_EXPORT QgsGeometryDuplicateNodesCheck : public QgsGeometryCheck
{
Q_OBJECT

public:
explicit QgsGeometryDuplicateNodesCheck( QgsGeometryCheckerContext *context )
: QgsGeometryCheck( FeatureNodeCheck, {QgsWkbTypes::LineGeometry, QgsWkbTypes::PolygonGeometry}, context ) {}
@@ -25,8 +25,6 @@ class QgsSpatialIndex;

class ANALYSIS_EXPORT QgsGeometryFollowBoundariesCheck : public QgsGeometryCheck
{
Q_OBJECT

public:
QgsGeometryFollowBoundariesCheck( QgsGeometryCheckerContext *context, QgsVectorLayer *checkLayer );
~QgsGeometryFollowBoundariesCheck() override;
@@ -74,8 +74,6 @@ class ANALYSIS_EXPORT QgsGeometryGapCheckError : public QgsGeometryCheckError

class ANALYSIS_EXPORT QgsGeometryGapCheck : public QgsGeometryCheck
{
Q_OBJECT

public:
QgsGeometryGapCheck( QgsGeometryCheckerContext *context, double thresholdMapUnits )
: QgsGeometryCheck( LayerCheck, {QgsWkbTypes::PolygonGeometry}, context )
@@ -22,8 +22,6 @@

class ANALYSIS_EXPORT QgsGeometryHoleCheck : public QgsGeometryCheck
{
Q_OBJECT

public:
explicit QgsGeometryHoleCheck( QgsGeometryCheckerContext *context )
: QgsGeometryCheck( FeatureCheck, {QgsWkbTypes::PolygonGeometry}, context ) {}
@@ -22,8 +22,6 @@

class ANALYSIS_EXPORT QgsGeometryLineIntersectionCheck : public QgsGeometryCheck
{
Q_OBJECT

public:
QgsGeometryLineIntersectionCheck( QgsGeometryCheckerContext *context )
: QgsGeometryCheck( FeatureNodeCheck, {QgsWkbTypes::LineGeometry}, context )
@@ -22,8 +22,6 @@

class ANALYSIS_EXPORT QgsGeometryLineLayerIntersectionCheck : public QgsGeometryCheck
{
Q_OBJECT

public:
QgsGeometryLineLayerIntersectionCheck( QgsGeometryCheckerContext *context, const QString &checkLayer )
: QgsGeometryCheck( FeatureNodeCheck, {QgsWkbTypes::LineGeometry}, context ), mCheckLayer( checkLayer )
@@ -22,8 +22,6 @@

class ANALYSIS_EXPORT QgsGeometryMultipartCheck : public QgsGeometryCheck
{
Q_OBJECT

public:
explicit QgsGeometryMultipartCheck( QgsGeometryCheckerContext *context )
: QgsGeometryCheck( FeatureCheck, {QgsWkbTypes::PointGeometry, QgsWkbTypes::LineGeometry, QgsWkbTypes::PolygonGeometry}, context ) {}
@@ -23,7 +23,7 @@ void QgsGeometryOverlapCheck::collectErrors( QList<QgsGeometryCheckError *> &err
double overlapThreshold = mThresholdMapUnits;
QMap<QString, QgsFeatureIds> featureIds = ids.isEmpty() ? allLayerFeatureIds() : ids;
const QgsGeometryCheckerUtils::LayerFeatures layerFeaturesA( mContext->featurePools, featureIds, mCompatibleGeometryTypes, progressCounter, true );
const QList<QString> layerIds = featureIds.keys();
QList<QString> layerIds = featureIds.keys();
for ( const QgsGeometryCheckerUtils::LayerFeature &layerFeatureA : layerFeaturesA )
{
// Ensure each pair of layers only gets compared once: remove the current layer from the layerIds, but add it to the layerList for layerFeaturesB
@@ -72,8 +72,6 @@ class ANALYSIS_EXPORT QgsGeometryOverlapCheckError : public QgsGeometryCheckErro

class ANALYSIS_EXPORT QgsGeometryOverlapCheck : public QgsGeometryCheck
{
Q_OBJECT

public:
QgsGeometryOverlapCheck( QgsGeometryCheckerContext *context, double thresholdMapUnits )
: QgsGeometryCheck( FeatureCheck, {QgsWkbTypes::PolygonGeometry}, context )
@@ -22,8 +22,6 @@

class ANALYSIS_EXPORT QgsGeometryPointCoveredByLineCheck : public QgsGeometryCheck
{
Q_OBJECT

public:
QgsGeometryPointCoveredByLineCheck( QgsGeometryCheckerContext *context )
: QgsGeometryCheck( FeatureNodeCheck, {QgsWkbTypes::PointGeometry}, context )
@@ -22,8 +22,6 @@

class ANALYSIS_EXPORT QgsGeometryPointInPolygonCheck : public QgsGeometryCheck
{
Q_OBJECT

public:
QgsGeometryPointInPolygonCheck( QgsGeometryCheckerContext *context )
: QgsGeometryCheck( FeatureNodeCheck, {QgsWkbTypes::PointGeometry}, context )
@@ -22,8 +22,6 @@

class ANALYSIS_EXPORT QgsGeometrySegmentLengthCheck : public QgsGeometryCheck
{
Q_OBJECT

public:
QgsGeometrySegmentLengthCheck( QgsGeometryCheckerContext *context, double minLengthMapUnits )
: QgsGeometryCheck( FeatureNodeCheck, {QgsWkbTypes::LineGeometry, QgsWkbTypes::PolygonGeometry}, context )
@@ -22,8 +22,6 @@

class ANALYSIS_EXPORT QgsGeometrySelfContactCheck : public QgsGeometryCheck
{
Q_OBJECT

public:
QgsGeometrySelfContactCheck( QgsGeometryCheckerContext *context )
: QgsGeometryCheck( FeatureNodeCheck, {QgsWkbTypes::LineGeometry, QgsWkbTypes::PolygonGeometry}, context ) {}
@@ -49,8 +49,6 @@ class ANALYSIS_EXPORT QgsGeometrySelfIntersectionCheckError : public QgsGeometry

class ANALYSIS_EXPORT QgsGeometrySelfIntersectionCheck : public QgsGeometryCheck
{
Q_OBJECT

public:
explicit QgsGeometrySelfIntersectionCheck( QgsGeometryCheckerContext *context )
: QgsGeometryCheck( FeatureNodeCheck, {QgsWkbTypes::LineGeometry, QgsWkbTypes::PolygonGeometry}, context ) {}
@@ -22,8 +22,6 @@

class ANALYSIS_EXPORT QgsGeometrySliverPolygonCheck : public QgsGeometryAreaCheck
{
Q_OBJECT

public:
QgsGeometrySliverPolygonCheck( QgsGeometryCheckerContext *context, double threshold, double maxAreaMapUnits )
: QgsGeometryAreaCheck( context, threshold )
@@ -46,8 +46,6 @@ class ANALYSIS_EXPORT QgsGeometryTypeCheckError : public QgsGeometryCheckError

class ANALYSIS_EXPORT QgsGeometryTypeCheck : public QgsGeometryCheck
{
Q_OBJECT

public:
QgsGeometryTypeCheck( QgsGeometryCheckerContext *context, int allowedTypes )
: QgsGeometryCheck( FeatureCheck, {QgsWkbTypes::PointGeometry, QgsWkbTypes::LineGeometry, QgsWkbTypes::PolygonGeometry}, context )

0 comments on commit 37d0b7b

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