Return QPersistentModelIndexes from QItemSelectionRange.

They are stored as such anyway, and this allows clients to not have to
convert between QModelIndex and back so much. This should be
fully source-compatible.

Change-Id: Ia606ea082442089a0aae1583380c3710ce61d3d1
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
bb10
Stephen Kelly 2012-09-27 11:24:38 +02:00 committed by The Qt Project
parent 308987fb96
commit 1511fb37cf
1 changed files with 2 additions and 2 deletions

View File

@ -72,8 +72,8 @@ public:
inline int width() const { return br.column() - tl.column() + 1; }
inline int height() const { return br.row() - tl.row() + 1; }
inline QModelIndex topLeft() const { return QModelIndex(tl); }
inline QModelIndex bottomRight() const { return QModelIndex(br); }
inline const QPersistentModelIndex &topLeft() const { return tl; }
inline const QPersistentModelIndex &bottomRight() const { return br; }
inline QModelIndex parent() const { return tl.parent(); }
inline const QAbstractItemModel *model() const { return tl.model(); }