From 15953e95030ee42c78a84c48c7a3f3c2c448601f Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 24 Feb 2012 16:32:53 +0100 Subject: QModelIndex: clean up integer size confusion in the API QAIM::createIndex() took either int or quint32, but QMI::internalId() returned qint64. In the new interface, createIndex() takes, and internalId() provides, integers of type quintptr. This matches the storage size of the void* in the model index and avoids truncation. Remove the createIndex(int, int, quint32) and \obsolete createIndex(int,int,int) overloads. This makes a literal 0 in the third parameter ambiguous now. The solutions have been noted in changes-5.0.0. Change-Id: I0a0ecd8430eaf695129a4d09d14d4e30745485c4 Reviewed-by: Stephen Kelly --- dist/changes-5.0.0 | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'dist') diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0 index baa04d7dfc..1d594b6ce7 100644 --- a/dist/changes-5.0.0 +++ b/dist/changes-5.0.0 @@ -186,6 +186,15 @@ information about a particular change. * The signature of the createEditor and valuePropertyName methods have been changed to take arguments of type int instead of QVariant::Type. +- QModelIndex/QAbstractItemModel + + * The integer value that can be stored in a QModelIndex is now of type + quintptr to match the size of the internal storage location. + * The createIndex() method now only provides the void* and quintptr + overloads, making calls with a literal 0 (createIndex(row, col, 0)) + ambiguous. Either cast (quintptr(0)) or omit the third argument + (to get the void* overload). + - QWindowSystemInterface: * The signature of all handleTouchEvent() variants have changed, -- cgit v1.2.3