|author||Marc Mutz <email@example.com>||2012-02-24 16:32:53 +0100|
|committer||The Qt Project <firstname.lastname@example.org>||2012-09-22 20:45:12 +0200|
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 <email@example.com>
Diffstat (limited to 'dist')
1 files changed, 9 insertions, 0 deletions
diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0
index baa04d7dfc..1d594b6ce7 100644
@@ -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.
+ * 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).
* The signature of all handleTouchEvent() variants have changed,