summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels/qidentityproxymodel.cpp
diff options
context:
space:
mode:
authorMark Brand <mabrand@mabrand.nl>2012-11-02 21:49:44 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-02 22:42:36 +0100
commite5ac4fb9b236c782e3ed6f15044eb9956246931a (patch)
treeb9b0493cb4409ec73eea9e5e68c054521799052c /src/corelib/itemmodels/qidentityproxymodel.cpp
parent698ae963e4cbb6c5d9239d0a10efc0cb910fa310 (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/corelib/itemmodels/qidentityproxymodel.cpp')
-rw-r--r--src/corelib/itemmodels/qidentityproxymodel.cpp2
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)));
}
/*!