diff --git a/src/corelib/itemmodels/qitemselectionmodel.cpp b/src/corelib/itemmodels/qitemselectionmodel.cpp index 6c7101d41f..74bd7abfcb 100644 --- a/src/corelib/itemmodels/qitemselectionmodel.cpp +++ b/src/corelib/itemmodels/qitemselectionmodel.cpp @@ -42,6 +42,7 @@ #include #include +#include #ifndef QT_NO_ITEMVIEWS @@ -307,7 +308,9 @@ bool QItemSelectionRange::operator<(const QItemSelectionRange &other) const } return topLeftParent < otherTopLeftParent; } - return tl.model() < other.tl.model(); + + std::less less; + return less(tl.model(), other.tl.model()); } /*!