Skip to content
Permalink
Browse files

Fix compiling with legacy Qt (aka Qt5)

  • Loading branch information
m-kuhn committed Mar 25, 2021
1 parent 42b7939 commit 20596227f789de6ac9a587df295dbd373fc63417
Showing with 4 additions and 0 deletions.
  1. +1 −0 python/core/auto_generated/qgis.sip.in
  2. +3 −0 src/core/qgis.h
@@ -259,6 +259,7 @@ QVariant data types (such as strings, numeric values, dates and times)
.. seealso:: :py:func:`qgsVariantLessThan`
%End


bool operator> ( const QVariant &v1, const QVariant &v2 );

bool operator< ( const QVariant &v1, const QVariant &v2 );
@@ -552,6 +552,8 @@ CORE_EXPORT bool qgsVariantEqual( const QVariant &lhs, const QVariant &rhs );
*/
CORE_EXPORT bool qgsVariantGreaterThan( const QVariant &lhs, const QVariant &rhs );

#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)

/**
* Compares two QVariant values and returns whether the first is greater than the second.
* Useful for sorting lists of variants, correctly handling sorting of the various
@@ -576,6 +578,7 @@ inline bool operator< ( const QVariant &v1, const QVariant &v2 )
{
return qgsVariantLessThan( v1, v2 );
}
#endif


#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)

0 comments on commit 2059622

Please sign in to comment.