QModelIndex: clean up integer size confusion in the API
authorMarc Mutz <marc.mutz@kdab.com>
Fri, 24 Feb 2012 15:32:53 +0000 (16:32 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Sat, 22 Sep 2012 18:45:12 +0000 (20:45 +0200)
commit15953e95030ee42c78a84c48c7a3f3c2c448601f
tree628bc796efb6c825f09efa331e292d834603ae8d
parentbe15856f61a949b8a01a1659c15af675c4c2f4e9
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 <stephen.kelly@kdab.com>
dist/changes-5.0.0
src/corelib/itemmodels/qabstractitemmodel.cpp
src/corelib/itemmodels/qabstractitemmodel.h
src/widgets/itemviews/qtablewidget.cpp
tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp
tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp