Add c++20 todo for replacing equality operators with default implementations

This commit is contained in:
Nyall Dawson 2021-07-02 08:39:20 +10:00
parent 65bccd2c61
commit c8156b0106
49 changed files with 63 additions and 3 deletions

View File

@ -132,6 +132,7 @@ Create a new Change
QgsGeometryCheck::ChangeType type; QgsGeometryCheck::ChangeType type;
QgsVertexId vidx; QgsVertexId vidx;
bool operator==( const QgsGeometryCheck::Change &other ); bool operator==( const QgsGeometryCheck::Change &other );
}; };

View File

@ -31,6 +31,7 @@ Construct a configuration for an authentication method
:param version: Version of the configuration (for updating previously saved configs later on) :param version: Version of the configuration (for updating previously saved configs later on)
%End %End
bool operator==( const QgsAuthMethodConfig &other ) const; bool operator==( const QgsAuthMethodConfig &other ) const;
bool operator!=( const QgsAuthMethodConfig &other ) const; bool operator!=( const QgsAuthMethodConfig &other ) const;

View File

@ -85,7 +85,6 @@ Copy constructor
%End %End
~QgsEditFormConfig(); ~QgsEditFormConfig();
bool operator==( const QgsEditFormConfig &o ); bool operator==( const QgsEditFormConfig &o );
void addTab( QgsAttributeEditorElement *data /Transfer/ ); void addTab( QgsAttributeEditorElement *data /Transfer/ );

View File

@ -191,6 +191,7 @@ on the line, or exactly in line with the segment) and the result is undefined.
Reverses the line segment, so that the start and end points are flipped. Reverses the line segment, so that the start and end points are flipped.
%End %End
bool operator==( const QgsLineSegment2D &other ) const /HoldGIL/; bool operator==( const QgsLineSegment2D &other ) const /HoldGIL/;
bool operator!=( const QgsLineSegment2D &other ) const /HoldGIL/; bool operator!=( const QgsLineSegment2D &other ) const /HoldGIL/;

View File

@ -44,6 +44,7 @@ Create a new default value with the given ``expression`` and ``applyOnUpdate`` f
.. seealso:: :py:func:`QgsVectorLayer.setDefaultValueDefinition` .. seealso:: :py:func:`QgsVectorLayer.setDefaultValueDefinition`
%End %End
bool operator==( const QgsDefaultValue &other ) const; bool operator==( const QgsDefaultValue &other ) const;
QString expression() const; QString expression() const;

View File

@ -60,6 +60,7 @@ Returns the dependency origin
Returns the ID of the layer this dependency depends on Returns the ID of the layer this dependency depends on
%End %End
bool operator==( const QgsMapLayerDependency &other ) const; bool operator==( const QgsMapLayerDependency &other ) const;
//! hash operator //! hash operator

View File

@ -45,6 +45,7 @@ Returns the message level
Returns the stack of categories of the message Returns the stack of categories of the message
%End %End
bool operator==( const QgsReadWriteContext::ReadWriteMessage &other ) const; bool operator==( const QgsReadWriteContext::ReadWriteMessage &other ) const;
bool operator!=( const QgsReadWriteContext::ReadWriteMessage &other ) const; bool operator!=( const QgsReadWriteContext::ReadWriteMessage &other ) const;

View File

@ -69,6 +69,7 @@ Returns the key associated to the symbol
Returns the symbol layer index path inside the symbol Returns the symbol layer index path inside the symbol
%End %End
bool operator==( const QgsSymbolLayerId &other ) const; bool operator==( const QgsSymbolLayerId &other ) const;
bool operator<( const QgsSymbolLayerId &other ) const; bool operator<( const QgsSymbolLayerId &other ) const;

View File

@ -68,6 +68,7 @@ struct QgsChunkNodeId
return QStringLiteral( "%1/%2/%3/%4" ).arg( d ).arg( x ).arg( y ).arg( z ); // octree return QStringLiteral( "%1/%2/%3/%4" ).arg( d ).arg( x ).arg( y ).arg( z ); // octree
} }
// TODO c++20 - replace with = default
bool operator==( const QgsChunkNodeId &other ) const bool operator==( const QgsChunkNodeId &other ) const
{ {
return d == other.d && x == other.x && y == other.y && z == other.z; return d == other.d && x == other.x && y == other.y && z == other.z;

View File

@ -108,6 +108,7 @@ class _3D_EXPORT QgsGoochMaterialSettings : public QgsAbstractMaterialSettings
#endif #endif
// TODO c++20 - replace with = default
bool operator==( const QgsGoochMaterialSettings &other ) const bool operator==( const QgsGoochMaterialSettings &other ) const
{ {
return mDiffuse == other.mDiffuse && return mDiffuse == other.mDiffuse &&

View File

@ -96,6 +96,7 @@ class _3D_EXPORT QgsPhongMaterialSettings : public QgsAbstractMaterialSettings
void applyDataDefinedToGeometry( Qt3DRender::QGeometry *geometry, int vertexCount, const QByteArray &data ) const override; void applyDataDefinedToGeometry( Qt3DRender::QGeometry *geometry, int vertexCount, const QByteArray &data ) const override;
#endif #endif
// TODO c++20 - replace with = default
bool operator==( const QgsPhongMaterialSettings &other ) const bool operator==( const QgsPhongMaterialSettings &other ) const
{ {
return mAmbient == other.mAmbient && return mAmbient == other.mAmbient &&

View File

@ -120,6 +120,7 @@ class _3D_EXPORT QgsPhongTexturedMaterialSettings : public QgsAbstractMaterialSe
void addParametersToEffect( Qt3DRender::QEffect *effect ) const override; void addParametersToEffect( Qt3DRender::QEffect *effect ) const override;
#endif #endif
// TODO c++20 - replace with = default
bool operator==( const QgsPhongTexturedMaterialSettings &other ) const bool operator==( const QgsPhongTexturedMaterialSettings &other ) const
{ {
return mAmbient == other.mAmbient && return mAmbient == other.mAmbient &&

View File

@ -78,6 +78,7 @@ class _3D_EXPORT QgsSimpleLineMaterialSettings : public QgsAbstractMaterialSetti
void addParametersToEffect( Qt3DRender::QEffect *effect ) const override; void addParametersToEffect( Qt3DRender::QEffect *effect ) const override;
#endif #endif
// TODO c++20 - replace with = default
bool operator==( const QgsSimpleLineMaterialSettings &other ) const bool operator==( const QgsSimpleLineMaterialSettings &other ) const
{ {
return mAmbient == other.mAmbient; return mAmbient == other.mAmbient;

View File

@ -75,6 +75,7 @@ class _3D_EXPORT QgsCameraPose
//! Reads configuration from a DOM element previously written using writeXml() //! Reads configuration from a DOM element previously written using writeXml()
void readXml( const QDomElement &elem ); void readXml( const QDomElement &elem );
// TODO c++20 - replace with = default
bool operator==( const QgsCameraPose &other ) const bool operator==( const QgsCameraPose &other ) const
{ {
return mCenterPoint == other.mCenterPoint && return mCenterPoint == other.mCenterPoint &&

View File

@ -55,6 +55,7 @@ class _3D_EXPORT QgsDirectionalLightSettings
//! Reads configuration from a DOM element previously written using writeXml() //! Reads configuration from a DOM element previously written using writeXml()
void readXml( const QDomElement &elem ); void readXml( const QDomElement &elem );
// TODO c++20 - replace with = default
bool operator==( const QgsDirectionalLightSettings &other ); bool operator==( const QgsDirectionalLightSettings &other );
private: private:

View File

@ -76,6 +76,7 @@ class _3D_EXPORT QgsPointLightSettings
//! Reads configuration from a DOM element previously written using writeXml() //! Reads configuration from a DOM element previously written using writeXml()
void readXml( const QDomElement &elem ); void readXml( const QDomElement &elem );
// TODO c++20 - replace with = default
bool operator==( const QgsPointLightSettings &other ); bool operator==( const QgsPointLightSettings &other );
private: private:

View File

@ -75,6 +75,7 @@ namespace QgsRayCastingUtils
Ray3D &transform( const QMatrix4x4 &matrix ); Ray3D &transform( const QMatrix4x4 &matrix );
Ray3D transformed( const QMatrix4x4 &matrix ) const; Ray3D transformed( const QMatrix4x4 &matrix ) const;
// TODO c++20 - replace with = default
bool operator==( const Ray3D &other ) const; bool operator==( const Ray3D &other ) const;
bool operator!=( const Ray3D &other ) const; bool operator!=( const Ray3D &other ) const;

View File

@ -48,6 +48,7 @@ class ANALYSIS_EXPORT Vector3D
//! Default constructor //! Default constructor
Vector3D() = default; Vector3D() = default;
// TODO c++20 - replace with = default
bool operator==( const Vector3D &v ) const; bool operator==( const Vector3D &v ) const;
bool operator!=( const Vector3D &v ) const; bool operator!=( const Vector3D &v ) const;
//! Returns the x-component of the vector //! Returns the x-component of the vector

View File

@ -200,6 +200,8 @@ class ANALYSIS_EXPORT QgsGeometryCheck
* The index of the part / ring / vertex, depending on \see what. * The index of the part / ring / vertex, depending on \see what.
*/ */
QgsVertexId vidx; QgsVertexId vidx;
// TODO c++20 - replace with = default
bool operator==( const QgsGeometryCheck::Change &other ) bool operator==( const QgsGeometryCheck::Change &other )
{ {
return what == other.what && type == other.type && vidx == other.vidx; return what == other.what && type == other.type && vidx == other.vidx;

View File

@ -42,6 +42,7 @@ struct Vertex
, fid( fid ) , fid( fid )
, vertexId( vertexId ) {} , vertexId( vertexId ) {}
// TODO c++20 - replace with = default
bool operator==( const Vertex &other ) const bool operator==( const Vertex &other ) const
{ {
return layer == other.layer && fid == other.fid && vertexId == other.vertexId; return layer == other.layer && fid == other.fid && vertexId == other.vertexId;

View File

@ -49,6 +49,8 @@ class CORE_EXPORT QgsAuthMethodConfig
*/ */
QgsAuthMethodConfig( const QString &method = QString(), int version = 0 ); QgsAuthMethodConfig( const QString &method = QString(), int version = 0 );
// TODO c++20 - replace with = default
//! Operator used to compare configs' equality //! Operator used to compare configs' equality
bool operator==( const QgsAuthMethodConfig &other ) const; bool operator==( const QgsAuthMethodConfig &other ) const;

View File

@ -124,7 +124,7 @@ class CORE_EXPORT QgsEditFormConfig
~QgsEditFormConfig(); ~QgsEditFormConfig();
QgsEditFormConfig &operator=( const QgsEditFormConfig &o ); QgsEditFormConfig &operator=( const QgsEditFormConfig &o );
// TODO c++20 - replace with = default
bool operator==( const QgsEditFormConfig &o ); bool operator==( const QgsEditFormConfig &o );
/** /**

View File

@ -2312,6 +2312,7 @@ class CORE_EXPORT QgsGeometry
% End % End
#endif #endif
// TODO c++20 - replace with = default
bool operator==( const QgsGeometry::Error &other ) const bool operator==( const QgsGeometry::Error &other ) const
{ {
return other.mMessage == mMessage && other.mHasLocation == mHasLocation && other.mLocation == mLocation; return other.mMessage == mMessage && other.mHasLocation == mHasLocation && other.mLocation == mLocation;

View File

@ -218,6 +218,8 @@ class CORE_EXPORT QgsLineSegment2D
std::swap( mStart, mEnd ); std::swap( mStart, mEnd );
} }
// TODO c++20 - replace with = default
//! Equality operator //! Equality operator
bool operator==( const QgsLineSegment2D &other ) const SIP_HOLDGIL bool operator==( const QgsLineSegment2D &other ) const SIP_HOLDGIL
{ {

View File

@ -127,6 +127,7 @@ class CORE_EXPORT QgsAbstractMetadataBase
*/ */
QString country; QString country;
// TODO c++20 - replace with = default
bool operator==( const QgsAbstractMetadataBase::Address &other ) const; bool operator==( const QgsAbstractMetadataBase::Address &other ) const;
}; };
@ -188,6 +189,7 @@ class CORE_EXPORT QgsAbstractMetadataBase
*/ */
QString role; QString role;
// TODO c++20 - replace with = default
bool operator==( const QgsAbstractMetadataBase::Contact &other ) const; bool operator==( const QgsAbstractMetadataBase::Contact &other ) const;
}; };
@ -252,6 +254,7 @@ class CORE_EXPORT QgsAbstractMetadataBase
*/ */
QString size; QString size;
// TODO c++20 - replace with = default
bool operator==( const QgsAbstractMetadataBase::Link &other ) const; bool operator==( const QgsAbstractMetadataBase::Link &other ) const;
}; };

View File

@ -81,6 +81,7 @@ class CORE_EXPORT QgsLayerMetadata : public QgsAbstractMetadataBase
*/ */
QgsBox3d bounds; QgsBox3d bounds;
// TODO c++20 - replace with = default
bool operator==( const QgsLayerMetadata::SpatialExtent &other ) const; bool operator==( const QgsLayerMetadata::SpatialExtent &other ) const;
}; };
@ -118,6 +119,7 @@ class CORE_EXPORT QgsLayerMetadata : public QgsAbstractMetadataBase
*/ */
void setTemporalExtents( const QList< QgsDateTimeRange > &extents ); void setTemporalExtents( const QList< QgsDateTimeRange > &extents );
// TODO c++20 - replace with = default
bool operator==( const QgsLayerMetadata::Extent &other ) const; bool operator==( const QgsLayerMetadata::Extent &other ) const;
#ifndef SIP_RUN #ifndef SIP_RUN
@ -155,6 +157,7 @@ class CORE_EXPORT QgsLayerMetadata : public QgsAbstractMetadataBase
*/ */
QString constraint; QString constraint;
// TODO c++20 - replace with = default
bool operator==( const QgsLayerMetadata::Constraint &other ) const; bool operator==( const QgsLayerMetadata::Constraint &other ) const;
}; };

View File

@ -62,6 +62,8 @@ class CORE_EXPORT IndexedPointCloudNode
//! Returns whether node is valid //! Returns whether node is valid
bool isValid() const { return mD >= 0; } bool isValid() const { return mD >= 0; }
// TODO c++20 - replace with = default
//! Compares nodes //! Compares nodes
bool operator==( IndexedPointCloudNode other ) const bool operator==( IndexedPointCloudNode other ) const
{ {

View File

@ -72,6 +72,7 @@ class CORE_EXPORT QgsProcessingModelChildDependency
return true; return true;
} }
// TODO c++20 - replace with = default
bool operator==( const QgsProcessingModelChildDependency &other ) const bool operator==( const QgsProcessingModelChildDependency &other ) const
{ {
return childId == other.childId && conditionalBranch == other.conditionalBranch; return childId == other.childId && conditionalBranch == other.conditionalBranch;

View File

@ -162,6 +162,7 @@ class CORE_EXPORT QgsProcessingFeatureSourceDefinition
*/ */
bool loadVariant( const QVariantMap &map ); bool loadVariant( const QVariantMap &map );
// TODO c++20 - replace with = default
bool operator==( const QgsProcessingFeatureSourceDefinition &other ) const bool operator==( const QgsProcessingFeatureSourceDefinition &other ) const
{ {
return source == other.source return source == other.source
@ -296,6 +297,7 @@ class CORE_EXPORT QgsProcessingOutputLayerDefinition
return QVariant::fromValue( *this ); return QVariant::fromValue( *this );
} }
// TODO c++20 - replace with = default
bool operator==( const QgsProcessingOutputLayerDefinition &other ) const; bool operator==( const QgsProcessingOutputLayerDefinition &other ) const;
bool operator!=( const QgsProcessingOutputLayerDefinition &other ) const; bool operator!=( const QgsProcessingOutputLayerDefinition &other ) const;

View File

@ -64,6 +64,7 @@ class QgsCoordinateTransformContextPrivate : public QSharedData
QString operation; QString operation;
bool allowFallback = true; bool allowFallback = true;
// TODO c++20 - replace with = default
bool operator==( const OperationDetails &other ) const bool operator==( const OperationDetails &other ) const
{ {
return operation == other.operation && allowFallback == other.allowFallback; return operation == other.operation && allowFallback == other.allowFallback;

View File

@ -73,6 +73,7 @@ class CORE_EXPORT QgsDatumTransform
*/ */
int destinationTransformId = -1; int destinationTransformId = -1;
// TODO c++20 - replace with = default
bool operator==( QgsDatumTransform::TransformPair other ) const bool operator==( QgsDatumTransform::TransformPair other ) const
{ {
return other.sourceTransformId == sourceTransformId && other.destinationTransformId == destinationTransformId; return other.sourceTransformId == sourceTransformId && other.destinationTransformId == destinationTransformId;

View File

@ -234,6 +234,7 @@ class CORE_EXPORT QgsAbstractDatabaseProviderConnection : public QgsAbstractProv
QgsWkbTypes::Type wkbType; QgsWkbTypes::Type wkbType;
QgsCoordinateReferenceSystem crs; QgsCoordinateReferenceSystem crs;
// TODO c++20 - replace with = default
inline bool operator==( const GeometryColumnType &other ) const inline bool operator==( const GeometryColumnType &other ) const
{ {
return this->crs == other.crs && this->wkbType == other.wkbType; return this->crs == other.crs && this->wkbType == other.wkbType;

View File

@ -230,6 +230,7 @@ class CORE_EXPORT QgsProviderSublayerDetails
*/ */
void setLayerNumber( int number ) { mLayerNumber = number; } void setLayerNumber( int number ) { mLayerNumber = number; }
// TODO c++20 - replace with = default
bool operator==( const QgsProviderSublayerDetails &other ) const; bool operator==( const QgsProviderSublayerDetails &other ) const;
bool operator!=( const QgsProviderSublayerDetails &other ) const; bool operator!=( const QgsProviderSublayerDetails &other ) const;

View File

@ -54,6 +54,7 @@ class CORE_EXPORT QgsAttributeTableConfig
//! Constructor for ColumnConfig //! Constructor for ColumnConfig
ColumnConfig() = default; ColumnConfig() = default;
// TODO c++20 - replace with = default
bool operator== ( const QgsAttributeTableConfig::ColumnConfig &other ) const SIP_SKIP; bool operator== ( const QgsAttributeTableConfig::ColumnConfig &other ) const SIP_SKIP;
QgsAttributeTableConfig::Type type = Field; //!< The type of this column. QgsAttributeTableConfig::Type type = Field; //!< The type of this column.

View File

@ -116,6 +116,7 @@ class CORE_EXPORT QgsBookmark
% End % End
#endif #endif
// TODO c++20 - replace with = default
bool operator==( const QgsBookmark &other ); bool operator==( const QgsBookmark &other );
bool operator!=( const QgsBookmark &other ); bool operator!=( const QgsBookmark &other );

View File

@ -59,6 +59,8 @@ class CORE_EXPORT QgsDefaultValue
* \see QgsVectorLayer::setDefaultValueDefinition * \see QgsVectorLayer::setDefaultValueDefinition
*/ */
explicit QgsDefaultValue( const QString &expression = QString(), bool applyOnUpdate = false ); explicit QgsDefaultValue( const QString &expression = QString(), bool applyOnUpdate = false );
// TODO c++20 - replace with = default
bool operator==( const QgsDefaultValue &other ) const; bool operator==( const QgsDefaultValue &other ) const;
/** /**

View File

@ -84,6 +84,7 @@ class QgsFieldPrivate : public QSharedData
~QgsFieldPrivate() = default; ~QgsFieldPrivate() = default;
// TODO c++20 - replace with = default
bool operator==( const QgsFieldPrivate &other ) const bool operator==( const QgsFieldPrivate &other ) const
{ {
return ( ( name == other.name ) && ( type == other.type ) && ( subType == other.subType ) return ( ( name == other.name ) && ( type == other.type ) && ( subType == other.subType )

View File

@ -141,6 +141,7 @@ class CORE_EXPORT QgsFieldConstraints
*/ */
void setConstraintExpression( const QString &expression, const QString &description = QString() ); void setConstraintExpression( const QString &expression, const QString &description = QString() );
// TODO c++20 - replace with = default
bool operator==( const QgsFieldConstraints &other ) const; bool operator==( const QgsFieldConstraints &other ) const;
private: private:

View File

@ -67,6 +67,8 @@ class CORE_EXPORT QgsFields
, originIndex( oi ) , originIndex( oi )
{} {}
// TODO c++20 - replace with = default
//! \since QGIS 2.6 //! \since QGIS 2.6
bool operator==( const Field &other ) const { return field == other.field && origin == other.origin && originIndex == other.originIndex; } bool operator==( const Field &other ) const { return field == other.field && origin == other.origin && originIndex == other.originIndex; }
//! \since QGIS 2.6 //! \since QGIS 2.6

View File

@ -67,6 +67,8 @@ class CORE_EXPORT QgsMapLayerDependency
//! Returns the ID of the layer this dependency depends on //! Returns the ID of the layer this dependency depends on
QString layerId() const { return mLayerId; } QString layerId() const { return mLayerId; }
// TODO c++20 - replace with = default
//! Comparison operator //! Comparison operator
bool operator==( const QgsMapLayerDependency &other ) const bool operator==( const QgsMapLayerDependency &other ) const
{ {

View File

@ -61,6 +61,7 @@ class CORE_EXPORT QgsMapThemeCollection : public QObject
//! Initialize layer record with a map layer - it will be stored as a weak pointer //! Initialize layer record with a map layer - it will be stored as a weak pointer
MapThemeLayerRecord( QgsMapLayer *l = nullptr ): mLayer( l ) {} MapThemeLayerRecord( QgsMapLayer *l = nullptr ): mLayer( l ) {}
// TODO c++20 - replace with = default
bool operator==( const QgsMapThemeCollection::MapThemeLayerRecord &other ) const bool operator==( const QgsMapThemeCollection::MapThemeLayerRecord &other ) const
{ {
return mLayer == other.mLayer && isVisible == other.isVisible && return mLayer == other.mLayer && isVisible == other.isVisible &&

View File

@ -276,6 +276,7 @@ class CORE_EXPORT QgsPointLocator : public QObject
return point; return point;
} }
// TODO c++20 - replace with = default
bool operator==( const QgsPointLocator::Match &other ) const bool operator==( const QgsPointLocator::Match &other ) const
{ {
return mType == other.mType && return mType == other.mType &&

View File

@ -57,6 +57,8 @@ class CORE_EXPORT QgsReadWriteContext
//! Returns the stack of categories of the message //! Returns the stack of categories of the message
QStringList categories() const {return mCategories;} QStringList categories() const {return mCategories;}
// TODO c++20 - replace with = default
bool operator==( const QgsReadWriteContext::ReadWriteMessage &other ) const bool operator==( const QgsReadWriteContext::ReadWriteMessage &other ) const
{ {
return mMessage == other.mMessage && mLevel == other.mLevel && mCategories == other.mCategories; return mMessage == other.mMessage && mLevel == other.mLevel && mCategories == other.mCategories;

View File

@ -143,6 +143,7 @@ class CORE_EXPORT QgsRemappingSinkDefinition
*/ */
bool loadVariant( const QVariantMap &map ); bool loadVariant( const QVariantMap &map );
// TODO c++20 - replace with = default
bool operator==( const QgsRemappingSinkDefinition &other ) const; bool operator==( const QgsRemappingSinkDefinition &other ) const;
bool operator!=( const QgsRemappingSinkDefinition &other ) const; bool operator!=( const QgsRemappingSinkDefinition &other ) const;

View File

@ -219,6 +219,7 @@ class CORE_EXPORT QgsSnappingConfig
*/ */
bool operator!= ( const QgsSnappingConfig::IndividualLayerSettings &other ) const; bool operator!= ( const QgsSnappingConfig::IndividualLayerSettings &other ) const;
// TODO c++20 - replace with = default
bool operator== ( const QgsSnappingConfig::IndividualLayerSettings &other ) const; bool operator== ( const QgsSnappingConfig::IndividualLayerSettings &other ) const;
private: private:

View File

@ -146,6 +146,7 @@ class CORE_EXPORT QgsSnappingUtils : public QObject
, unit( u ) , unit( u )
{} {}
// TODO c++20 - replace with = default
bool operator==( const QgsSnappingUtils::LayerConfig &other ) const bool operator==( const QgsSnappingUtils::LayerConfig &other ) const
{ {
return layer == other.layer && type == other.type && tolerance == other.tolerance && unit == other.unit; return layer == other.layer && type == other.type && tolerance == other.tolerance && unit == other.unit;

View File

@ -65,9 +65,10 @@ class CORE_EXPORT QgsTimeDuration
!hours && !minutes && !seconds; !hours && !minutes && !seconds;
} }
// TODO c++20 - replace with = default
bool operator==( const QgsTimeDuration &other ) const bool operator==( const QgsTimeDuration &other ) const
{ {
return years == other.years && months == other.months && return years == other.years && months == other.months && weeks == other.weeks &&
days == other.days && hours == other.hours && days == other.days && hours == other.hours &&
minutes == other.minutes && seconds == other.seconds; minutes == other.minutes && seconds == other.seconds;
} }

View File

@ -60,6 +60,7 @@ class CORE_EXPORT QgsVector3D
mZ = z; mZ = z;
} }
// TODO c++20 - replace with = default
bool operator==( const QgsVector3D &other ) const bool operator==( const QgsVector3D &other ) const
{ {
return mX == other.mX && mY == other.mY && mZ == other.mZ; return mX == other.mX && mY == other.mY && mZ == other.mZ;

View File

@ -85,6 +85,8 @@ class CORE_EXPORT QgsSymbolLayerId
*/ */
QVector<int> symbolLayerIndexPath() const { return mIndexPath; } QVector<int> symbolLayerIndexPath() const { return mIndexPath; }
// TODO c++20 - replace with = default
//! Equality operator //! Equality operator
bool operator==( const QgsSymbolLayerId &other ) const bool operator==( const QgsSymbolLayerId &other ) const
{ {