QAbstractProxyModel: 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 9dfba89c28 and
e5ac4fb9b2
Change-Id: I25cd7baa4a93284ab14ede988ac524971870794e
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This commit is contained in:
Mark Brand 2012-11-08 01:54:13 +01:00 committed by The Qt Project
parent 6e8f26a645
commit 999109866d

View File

@ -366,7 +366,7 @@ bool QAbstractProxyModel::hasChildren(const QModelIndex &parent) const
QModelIndex QAbstractProxyModel::sibling(int row, int column, const QModelIndex &idx) const
{
Q_D(const QAbstractProxyModel);
return d->model->sibling(row, column, mapToSource(idx));
return mapFromSource(d->model->sibling(row, column, mapToSource(idx)));
}
/*!