Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix compiling with legacy Qt (aka Qt5)
  • Loading branch information
m-kuhn committed Mar 25, 2021
1 parent 42b7939 commit 2059622
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions python/core/auto_generated/qgis.sip.in
Expand Up @@ -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 );
Expand Down
3 changes: 3 additions & 0 deletions src/core/qgis.h
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 2059622

Please sign in to comment.