summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel.cpp5
1 files changed, 4 insertions, 1 deletions
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 <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());
}
/*!