summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels/qabstractitemmodel.h
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2017-09-01 14:23:14 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2017-09-01 17:03:33 +0000
commitf71a99c0ebdf3ad88f66a8e731490f496f25592b (patch)
tree56821f5fe2bc19122ac9e8276969c3164ac6317a /src/corelib/itemmodels/qabstractitemmodel.h
parent541a03155222af509ab703cf6665b19baf25344b (diff)
QModelIndex: use std::less to compare pointers
Comparing pointers not belonging to the same array requires using std::less. Change-Id: I2725aa0899f6b9fece73dadd9ee5c10242d50ae1 Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/corelib/itemmodels/qabstractitemmodel.h')
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/itemmodels/qabstractitemmodel.h b/src/corelib/itemmodels/qabstractitemmodel.h
index 907ba09676..a211d8e8ca 100644
--- a/src/corelib/itemmodels/qabstractitemmodel.h
+++ b/src/corelib/itemmodels/qabstractitemmodel.h
@@ -79,7 +79,7 @@ public:
return r < other.r
|| (r == other.r && (c < other.c
|| (c == other.c && (i < other.i
- || (i == other.i && m < other.m )))));
+ || (i == other.i && std::less<const QAbstractItemModel *>()(m, other.m))))));
}
private:
inline QModelIndex(int arow, int acolumn, void *ptr, const QAbstractItemModel *amodel) Q_DECL_NOTHROW