diff options
author | Mark Brand <mabrand@mabrand.nl> | 2012-11-02 21:49:44 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-02 22:42:36 +0100 |
commit | e5ac4fb9b236c782e3ed6f15044eb9956246931a (patch) | |
tree | b9b0493cb4409ec73eea9e5e68c054521799052c /src | |
parent | 698ae963e4cbb6c5d9239d0a10efc0cb910fa310 (diff) |
QIdentityProxyModel: fix sibling() reimplementation
The previously missing mapFromSource() sets the proxy model in the
returned index. Otherwise, the returned index refers incorrectly to
the source model.
Follow-up to 9dfba89c28bbff3316cb7aed6c07f90c0f2d5a22.
Change-Id: I78ab9183820909b646a7333f28aa5ec7266fa675
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/itemmodels/qidentityproxymodel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/itemmodels/qidentityproxymodel.cpp b/src/corelib/itemmodels/qidentityproxymodel.cpp index 75a1c0d4e0..3dbe93b21a 100644 --- a/src/corelib/itemmodels/qidentityproxymodel.cpp +++ b/src/corelib/itemmodels/qidentityproxymodel.cpp @@ -174,7 +174,7 @@ QModelIndex QIdentityProxyModel::index(int row, int column, const QModelIndex& p QModelIndex QIdentityProxyModel::sibling(int row, int column, const QModelIndex &idx) const { Q_D(const QIdentityProxyModel); - return d->model->sibling(row, column, mapToSource(idx)); + return mapFromSource(d->model->sibling(row, column, mapToSource(idx))); } /*! |