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
parent
308987fb96
commit
1511fb37cf
|
|
@ -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(); }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue