From f71a99c0ebdf3ad88f66a8e731490f496f25592b Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Fri, 1 Sep 2017 14:23:14 +0200 Subject: 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 --- src/corelib/itemmodels/qabstractitemmodel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/itemmodels/qabstractitemmodel.h') 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()(m, other.m)))))); } private: inline QModelIndex(int arow, int acolumn, void *ptr, const QAbstractItemModel *amodel) Q_DECL_NOTHROW -- cgit v1.2.3