summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2012-02-24 16:32:53 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-09-22 20:45:12 +0200
commit15953e95030ee42c78a84c48c7a3f3c2c448601f (patch)
tree628bc796efb6c825f09efa331e292d834603ae8d /src/widgets/itemviews
parentbe15856f61a949b8a01a1659c15af675c4c2f4e9 (diff)
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>
Diffstat (limited to 'src/widgets/itemviews')
-rw-r--r--src/widgets/itemviews/qtablewidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/itemviews/qtablewidget.cpp b/src/widgets/itemviews/qtablewidget.cpp
index 14d14913f5..b74d1195b6 100644
--- a/src/widgets/itemviews/qtablewidget.cpp
+++ b/src/widgets/itemviews/qtablewidget.cpp
@@ -521,8 +521,8 @@ void QTableModel::sort(int column, Qt::SortOrder order)
: unsortable.at(i - sortable.count()));
for (int c = 0; c < columnCount(); ++c) {
sorted_table[tableIndex(i, c)] = item(r, c);
- from.append(createIndex(r, c, 0));
- to.append(createIndex(i, c, 0));
+ from.append(createIndex(r, c));
+ to.append(createIndex(i, c));
}
}