Skip to content

Commit be3c780

Browse files
committed
Make it work with Qt5 < 5.6
1 parent 46f7c64 commit be3c780

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/providers/postgres/qgspostgresprovider.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,17 @@ static bool operator<( const QVariant &a, const QVariant &b )
403403
}
404404
#endif
405405

406+
#if QT_VERSION >= 0x050000 && QT_VERSION < 0x050600
407+
#include <algorithm>
408+
template <typename T>
409+
bool operator<( const QList<T> &lhs, const QList<T> &rhs )
410+
{
411+
return std::lexicographical_compare( lhs.begin(), lhs.end(),
412+
rhs.begin(), rhs.end() );
413+
}
414+
#endif
415+
416+
406417
QgsFeatureIterator QgsPostgresProvider::getFeatures( const QgsFeatureRequest& request ) const
407418
{
408419
if ( !mValid )

0 commit comments

Comments
 (0)