diff --git a/python/core/auto_generated/numericformats/qgsnumericformat.sip.in b/python/core/auto_generated/numericformats/qgsnumericformat.sip.in index be3f89f5e8f..e3315d79f4e 100644 --- a/python/core/auto_generated/numericformats/qgsnumericformat.sip.in +++ b/python/core/auto_generated/numericformats/qgsnumericformat.sip.in @@ -157,7 +157,6 @@ Sets the ``interpretation`` of the numbers being converted. .. versionadded:: 3.26 %End - }; %ModuleHeaderCode @@ -273,6 +272,8 @@ Writes the format to an XML ``element``. bool operator==( const QgsNumericFormat &other ) const; bool operator!=( const QgsNumericFormat &other ) const; + protected: + }; /************************************************************************ diff --git a/src/core/numericformats/qgsbearingnumericformat.cpp b/src/core/numericformats/qgsbearingnumericformat.cpp index c336f48e74d..fcae60b651a 100644 --- a/src/core/numericformats/qgsbearingnumericformat.cpp +++ b/src/core/numericformats/qgsbearingnumericformat.cpp @@ -34,7 +34,7 @@ QString QgsBearingNumericFormat::visibleName() const int QgsBearingNumericFormat::sortKey() { - return QgsNumericFormat::sortKey(); // clazy:exclude=skipped-base-method + return DEFAULT_SORT_KEY; } double QgsBearingNumericFormat::suggestSampleValue() const diff --git a/src/core/numericformats/qgscoordinatenumericformat.cpp b/src/core/numericformats/qgscoordinatenumericformat.cpp index e461dfee0bd..495bd8979fc 100644 --- a/src/core/numericformats/qgscoordinatenumericformat.cpp +++ b/src/core/numericformats/qgscoordinatenumericformat.cpp @@ -55,7 +55,7 @@ QString QgsGeographicCoordinateNumericFormat::visibleName() const int QgsGeographicCoordinateNumericFormat::sortKey() { - return QgsNumericFormat::sortKey(); // clazy:exclude=skipped-base-method + return DEFAULT_SORT_KEY; } double QgsGeographicCoordinateNumericFormat::suggestSampleValue() const diff --git a/src/core/numericformats/qgscurrencynumericformat.cpp b/src/core/numericformats/qgscurrencynumericformat.cpp index 3a5793fbd6c..2c59bb0abe5 100644 --- a/src/core/numericformats/qgscurrencynumericformat.cpp +++ b/src/core/numericformats/qgscurrencynumericformat.cpp @@ -37,7 +37,7 @@ QString QgsCurrencyNumericFormat::visibleName() const int QgsCurrencyNumericFormat::sortKey() { - return QgsNumericFormat::sortKey(); // clazy:exclude=skipped-base-method + return DEFAULT_SORT_KEY; } double QgsCurrencyNumericFormat::suggestSampleValue() const diff --git a/src/core/numericformats/qgsnumericformat.cpp b/src/core/numericformats/qgsnumericformat.cpp index 1f15473ecbb..13a9d2dc17b 100644 --- a/src/core/numericformats/qgsnumericformat.cpp +++ b/src/core/numericformats/qgsnumericformat.cpp @@ -47,7 +47,7 @@ QgsNumericFormatContext::QgsNumericFormatContext() int QgsNumericFormat::sortKey() { - return 100; + return DEFAULT_SORT_KEY; } double QgsNumericFormat::suggestSampleValue() const @@ -72,4 +72,3 @@ bool QgsNumericFormat::operator!=( const QgsNumericFormat &other ) const { return !operator==( other ); } - diff --git a/src/core/numericformats/qgsnumericformat.h b/src/core/numericformats/qgsnumericformat.h index 36b0e68fe3a..fe48228e302 100644 --- a/src/core/numericformats/qgsnumericformat.h +++ b/src/core/numericformats/qgsnumericformat.h @@ -222,7 +222,6 @@ class CORE_EXPORT QgsNumericFormatContext mInterpretation = interpretation; } - private: QChar mThousandsSep; QChar mDecimalSep; @@ -350,6 +349,9 @@ class CORE_EXPORT QgsNumericFormat bool operator==( const QgsNumericFormat &other ) const; bool operator!=( const QgsNumericFormat &other ) const; + protected: + + static constexpr int DEFAULT_SORT_KEY = 100; }; #endif // QGSNUMERICFORMAT_H diff --git a/src/core/numericformats/qgspercentagenumericformat.cpp b/src/core/numericformats/qgspercentagenumericformat.cpp index 2f51e453fb6..43ce1df5f87 100644 --- a/src/core/numericformats/qgspercentagenumericformat.cpp +++ b/src/core/numericformats/qgspercentagenumericformat.cpp @@ -34,7 +34,7 @@ QString QgsPercentageNumericFormat::visibleName() const int QgsPercentageNumericFormat::sortKey() { - return QgsNumericFormat::sortKey(); // clazy:exclude=skipped-base-method + return DEFAULT_SORT_KEY; } double QgsPercentageNumericFormat::suggestSampleValue() const diff --git a/src/core/numericformats/qgsscientificnumericformat.cpp b/src/core/numericformats/qgsscientificnumericformat.cpp index 1c192c86448..9e1435398a2 100644 --- a/src/core/numericformats/qgsscientificnumericformat.cpp +++ b/src/core/numericformats/qgsscientificnumericformat.cpp @@ -35,7 +35,7 @@ QString QgsScientificNumericFormat::visibleName() const int QgsScientificNumericFormat::sortKey() { - return QgsNumericFormat::sortKey(); // clazy:exclude=skipped-base-method + return DEFAULT_SORT_KEY; } QString QgsScientificNumericFormat::formatDouble( double value, const QgsNumericFormatContext &context ) const