diff options
Diffstat (limited to 'src/corelib/itemmodels/qitemselectionmodel.cpp')
-rw-r--r-- | src/corelib/itemmodels/qitemselectionmodel.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/itemmodels/qitemselectionmodel.cpp b/src/corelib/itemmodels/qitemselectionmodel.cpp index 7714aa5e46..2ff311bc5a 100644 --- a/src/corelib/itemmodels/qitemselectionmodel.cpp +++ b/src/corelib/itemmodels/qitemselectionmodel.cpp @@ -42,6 +42,7 @@ #include <qdebug.h> #include <algorithm> +#include <functional> #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<const QAbstractItemModel *> less; + return less(tl.model(), other.tl.model()); } /*! |