Skip to content
Permalink
Browse files

Fix translation for geometry checks

Q_DELCARE_TR_FUNCTIONS must be used in the subclass. If used from the super class
it simply does not work.
  • Loading branch information
m-kuhn authored and nyalldawson committed Oct 11, 2020
1 parent 6de9f60 commit 1ddfbe689ba8934b7f40831f54ac98740b7842b1
Showing with 24 additions and 3 deletions.
  1. +1 −0 src/analysis/vector/geometry_checker/qgsgeometryanglecheck.h
  2. +1 −0 src/analysis/vector/geometry_checker/qgsgeometryareacheck.h
  3. +0 −1 src/analysis/vector/geometry_checker/qgsgeometrycheck.h
  4. +1 −0 src/analysis/vector/geometry_checker/qgsgeometrycontainedcheck.h
  5. +1 −0 src/analysis/vector/geometry_checker/qgsgeometrydanglecheck.h
  6. +1 −0 src/analysis/vector/geometry_checker/qgsgeometrydegeneratepolygoncheck.h
  7. +1 −0 src/analysis/vector/geometry_checker/qgsgeometryduplicatecheck.h
  8. +1 −0 src/analysis/vector/geometry_checker/qgsgeometryduplicatenodescheck.h
  9. +1 −0 src/analysis/vector/geometry_checker/qgsgeometryfollowboundariescheck.h
  10. +3 −1 src/analysis/vector/geometry_checker/qgsgeometrygapcheck.h
  11. +1 −0 src/analysis/vector/geometry_checker/qgsgeometryholecheck.h
  12. +1 −0 src/analysis/vector/geometry_checker/qgsgeometryisvalidcheck.h
  13. +1 −0 src/analysis/vector/geometry_checker/qgsgeometrylineintersectioncheck.h
  14. +1 −0 src/analysis/vector/geometry_checker/qgsgeometrylinelayerintersectioncheck.h
  15. +1 −1 src/analysis/vector/geometry_checker/qgsgeometrymissingvertexcheck.h
  16. +1 −0 src/analysis/vector/geometry_checker/qgsgeometrymultipartcheck.h
  17. +1 −0 src/analysis/vector/geometry_checker/qgsgeometryoverlapcheck.h
  18. +1 −0 src/analysis/vector/geometry_checker/qgsgeometrypointcoveredbylinecheck.h
  19. +1 −0 src/analysis/vector/geometry_checker/qgsgeometrypointinpolygoncheck.h
  20. +1 −0 src/analysis/vector/geometry_checker/qgsgeometrysegmentlengthcheck.h
  21. +1 −0 src/analysis/vector/geometry_checker/qgsgeometryselfcontactcheck.h
  22. +1 −0 src/analysis/vector/geometry_checker/qgsgeometryselfintersectioncheck.h
  23. +1 −0 src/analysis/vector/geometry_checker/qgsgeometrytypecheck.h
@@ -25,6 +25,7 @@
*/
class ANALYSIS_EXPORT QgsGeometryAngleCheck : public QgsGeometryCheck
{
Q_DECLARE_TR_FUNCTIONS( QgsGeometryAngleCheck )
public:
enum ResolutionMethod
{
@@ -27,6 +27,7 @@ class QgsSurface;
*/
class ANALYSIS_EXPORT QgsGeometryAreaCheck : public QgsGeometryCheck
{
Q_DECLARE_TR_FUNCTIONS( QgsGeometryAreaCheck )
public:
enum ResolutionMethod { MergeLongestEdge, MergeLargestArea, MergeIdenticalAttribute, Delete, NoChange };

@@ -91,7 +91,6 @@ class QgsFeaturePool;
class ANALYSIS_EXPORT QgsGeometryCheck
{
Q_GADGET
Q_DECLARE_TR_FUNCTIONS( QgsGeometryCheck )

public:

@@ -54,6 +54,7 @@ class ANALYSIS_EXPORT QgsGeometryContainedCheckError : public QgsGeometryCheckEr
*/
class ANALYSIS_EXPORT QgsGeometryContainedCheck : public QgsGeometryCheck
{
Q_DECLARE_TR_FUNCTIONS( QgsGeometryContainedCheck )
public:
enum ResolutionMethod { Delete, NoChange };

@@ -25,6 +25,7 @@
*/
class ANALYSIS_EXPORT QgsGeometryDangleCheck : public QgsGeometryCheck
{
Q_DECLARE_TR_FUNCTIONS( QgsGeometryDangleCheck )
public:
QgsGeometryDangleCheck( QgsGeometryCheckContext *context, const QVariantMap &configuration )
: QgsGeometryCheck( context, configuration )
@@ -25,6 +25,7 @@
*/
class ANALYSIS_EXPORT QgsGeometryDegeneratePolygonCheck : public QgsGeometryCheck
{
Q_DECLARE_TR_FUNCTIONS( QgsGeometryDegeneratePolygonCheck )
public:
enum ResolutionMethod { DeleteRing, NoChange };

@@ -58,6 +58,7 @@ class ANALYSIS_EXPORT QgsGeometryDuplicateCheckError : public QgsGeometryCheckEr
*/
class ANALYSIS_EXPORT QgsGeometryDuplicateCheck : public QgsGeometryCheck
{
Q_DECLARE_TR_FUNCTIONS( QgsGeometryDuplicateCheck )
public:
explicit QgsGeometryDuplicateCheck( QgsGeometryCheckContext *context, const QVariantMap &configuration )
: QgsGeometryCheck( context, configuration ) {}
@@ -25,6 +25,7 @@
*/
class ANALYSIS_EXPORT QgsGeometryDuplicateNodesCheck : public QgsGeometryCheck
{
Q_DECLARE_TR_FUNCTIONS( QgsGeometryDuplicateNodesCheck )
public:
explicit QgsGeometryDuplicateNodesCheck( QgsGeometryCheckContext *context, const QVariantMap &configuration )
: QgsGeometryCheck( context, configuration ) {}
@@ -28,6 +28,7 @@ class QgsSpatialIndex;
*/
class ANALYSIS_EXPORT QgsGeometryFollowBoundariesCheck : public QgsGeometryCheck
{
Q_DECLARE_TR_FUNCTIONS( QgsGeometryFollowBoundariesCheck )
public:
QgsGeometryFollowBoundariesCheck( QgsGeometryCheckContext *context, const QVariantMap &configuration, QgsVectorLayer *checkLayer );
~QgsGeometryFollowBoundariesCheck() override;
@@ -21,6 +21,7 @@
#include "qgsgeometrycheck.h"
#include "qgsgeometrycheckerror.h"
#include "qgsfeatureid.h"
#include <QObject>

/**
* \ingroup analysis
@@ -88,7 +89,8 @@ class ANALYSIS_EXPORT QgsGeometryGapCheckError : public QgsGeometryCheckError
*/
class ANALYSIS_EXPORT QgsGeometryGapCheck : public QgsGeometryCheck
{
Q_GADGET
Q_DECLARE_TR_FUNCTIONS( QgsGeometryGapCheck )

public:
//! Resolution methods for geometry gap checks
enum ResolutionMethod
@@ -25,6 +25,7 @@
*/
class ANALYSIS_EXPORT QgsGeometryHoleCheck : public QgsGeometryCheck
{
Q_DECLARE_TR_FUNCTIONS( QgsGeometryHoleCheck )
public:
explicit QgsGeometryHoleCheck( QgsGeometryCheckContext *context, const QVariantMap &configuration )
: QgsGeometryCheck( context, configuration ) {}
@@ -53,6 +53,7 @@ class ANALYSIS_EXPORT QgsGeometryIsValidCheckError : public QgsSingleGeometryChe
*/
class ANALYSIS_EXPORT QgsGeometryIsValidCheck : public QgsSingleGeometryCheck
{
Q_DECLARE_TR_FUNCTIONS( QgsGeometryIsValidCheck )
public:

/**
@@ -25,6 +25,7 @@
*/
class ANALYSIS_EXPORT QgsGeometryLineIntersectionCheck : public QgsGeometryCheck
{
Q_DECLARE_TR_FUNCTIONS( QgsGeometryLineIntersectionCheck )
public:
QgsGeometryLineIntersectionCheck( QgsGeometryCheckContext *context, const QVariantMap &configuration )
: QgsGeometryCheck( context, configuration )
@@ -25,6 +25,7 @@
*/
class ANALYSIS_EXPORT QgsGeometryLineLayerIntersectionCheck : public QgsGeometryCheck
{
Q_DECLARE_TR_FUNCTIONS( QgsGeometryLineLayerIntersectionCheck )
public:
QgsGeometryLineLayerIntersectionCheck( QgsGeometryCheckContext *context, const QVariantMap &configuration )
: QgsGeometryCheck( context, configuration )
@@ -84,7 +84,7 @@ class ANALYSIS_EXPORT QgsGeometryMissingVertexCheckError : public QgsGeometryChe
*/
class ANALYSIS_EXPORT QgsGeometryMissingVertexCheck : public QgsGeometryCheck
{
Q_GADGET
Q_DECLARE_TR_FUNCTIONS( QgsGeometryMissingVertexCheck )

public:

@@ -25,6 +25,7 @@
*/
class ANALYSIS_EXPORT QgsGeometryMultipartCheck : public QgsSingleGeometryCheck
{
Q_DECLARE_TR_FUNCTIONS( QgsGeometryMultipartCheck )
public:
explicit QgsGeometryMultipartCheck( QgsGeometryCheckContext *context, const QVariantMap &configuration )
: QgsSingleGeometryCheck( context,
@@ -92,6 +92,7 @@ class ANALYSIS_EXPORT QgsGeometryOverlapCheckError : public QgsGeometryCheckErro
*/
class ANALYSIS_EXPORT QgsGeometryOverlapCheck : public QgsGeometryCheck
{
Q_DECLARE_TR_FUNCTIONS( QgsGeometryOverlapCheck )
public:

/**
@@ -25,6 +25,7 @@
*/
class ANALYSIS_EXPORT QgsGeometryPointCoveredByLineCheck : public QgsGeometryCheck
{
Q_DECLARE_TR_FUNCTIONS( QgsGeometryPointCoveredByLineCheck )
public:
QgsGeometryPointCoveredByLineCheck( QgsGeometryCheckContext *context, const QVariantMap &configuration )
: QgsGeometryCheck( context, configuration )
@@ -25,6 +25,7 @@
*/
class ANALYSIS_EXPORT QgsGeometryPointInPolygonCheck : public QgsGeometryCheck
{
Q_DECLARE_TR_FUNCTIONS( QgsGeometryPointInPolygonCheck )
public:
QgsGeometryPointInPolygonCheck( QgsGeometryCheckContext *context, const QVariantMap &configuration )
: QgsGeometryCheck( context, configuration )
@@ -25,6 +25,7 @@
*/
class ANALYSIS_EXPORT QgsGeometrySegmentLengthCheck : public QgsGeometryCheck
{
Q_DECLARE_TR_FUNCTIONS( QgsGeometrySegmentLengthCheck )
public:
QgsGeometrySegmentLengthCheck( QgsGeometryCheckContext *context, const QVariantMap &configuration )
: QgsGeometryCheck( context, configuration )
@@ -25,6 +25,7 @@
*/
class ANALYSIS_EXPORT QgsGeometrySelfContactCheck : public QgsSingleGeometryCheck
{
Q_DECLARE_TR_FUNCTIONS( QgsGeometrySelfContactCheck )
public:
QgsGeometrySelfContactCheck( QgsGeometryCheckContext *context, const QVariantMap &configuration )
: QgsSingleGeometryCheck( context, configuration ) {}
@@ -50,6 +50,7 @@ class ANALYSIS_EXPORT QgsGeometrySelfIntersectionCheckError : public QgsSingleGe
*/
class ANALYSIS_EXPORT QgsGeometrySelfIntersectionCheck : public QgsSingleGeometryCheck
{
Q_DECLARE_TR_FUNCTIONS( QgsGeometrySelfIntersectionCheck )
public:
enum ResolutionMethod
{
@@ -48,6 +48,7 @@ class ANALYSIS_EXPORT QgsGeometryTypeCheckError : public QgsSingleGeometryCheckE
*/
class ANALYSIS_EXPORT QgsGeometryTypeCheck : public QgsSingleGeometryCheck
{
Q_DECLARE_TR_FUNCTIONS( QgsGeometryTypeCheck )
public:
QgsGeometryTypeCheck( QgsGeometryCheckContext *context, const QVariantMap &configuration, int allowedTypes )
: QgsSingleGeometryCheck( context, configuration )

0 comments on commit 1ddfbe6

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