Skip to content
Permalink
Browse files

Add missing qHash for older Qt versions

  • Loading branch information
nyalldawson committed Dec 1, 2017
1 parent 8026008 commit 0fcbeb7867f696dea6394b2c454c89ac4c7a088a
Showing with 12 additions and 0 deletions.
  1. +8 −0 src/core/qgsattributes.cpp
  2. +4 −0 src/core/qgsattributes.h
@@ -29,3 +29,11 @@ QgsAttributeMap QgsAttributes::toMap() const
}
return map;
}

uint qHash( const QgsAttributes &attributes )
{
if ( attributes.isEmpty() )
return -1;
else
return qHash( attributes.at( 0 ) );
}
@@ -120,6 +120,10 @@ class CORE_EXPORT QgsAttributes : public QVector<QVariant>

inline bool operator!=( const QgsAttributes &v ) const { return !( *this == v ); }
};

//! Hash for QgsAttributes
CORE_EXPORT uint qHash( const QgsAttributes &attributes );

#else
typedef QVector<QVariant> QgsAttributes;

0 comments on commit 0fcbeb7

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