Skip to content
Permalink
Browse files

Add missing const to equality operator

  • Loading branch information
nyalldawson committed Dec 11, 2014
1 parent 3a64b44 commit cee539aae8d0ee3e11edb06f845c84f75566ad96
Showing with 6 additions and 6 deletions.
  1. +2 −2 python/core/qgsdatadefined.sip
  2. +2 −2 src/core/qgsdatadefined.cpp
  3. +2 −2 src/core/qgsdatadefined.h
@@ -76,7 +76,7 @@ class QgsDataDefined
*/
bool setFromXmlElement( const QDomElement& element );

bool operator==( const QgsDataDefined &other );
bool operator!=( const QgsDataDefined &other );
bool operator==( const QgsDataDefined &other ) const;
bool operator!=( const QgsDataDefined &other ) const;

};
@@ -161,13 +161,13 @@ bool QgsDataDefined::setFromXmlElement( const QDomElement &element )
return true;
}

bool QgsDataDefined::operator==( const QgsDataDefined &other )
bool QgsDataDefined::operator==( const QgsDataDefined &other ) const
{
return other.isActive() == mActive && other.useExpression() == mUseExpression &&
other.field() == mField && other.expressionString() == mExpressionString;
}

bool QgsDataDefined::operator!=( const QgsDataDefined &other )
bool QgsDataDefined::operator!=( const QgsDataDefined &other ) const
{
return !( *this == other );
}
@@ -98,8 +98,8 @@ class CORE_EXPORT QgsDataDefined
*/
bool setFromXmlElement( const QDomElement& element );

bool operator==( const QgsDataDefined &other );
bool operator!=( const QgsDataDefined &other );
bool operator==( const QgsDataDefined &other ) const;
bool operator!=( const QgsDataDefined &other ) const;

private:
QgsExpression* mExpression;

0 comments on commit cee539a

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