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 9dfba89c28.

Change-Id: I78ab9183820909b646a7333f28aa5ec7266fa675
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This commit is contained in:
Mark Brand 2012-11-02 21:49:44 +01:00 committed by The Qt Project
parent 698ae963e4
commit e5ac4fb9b2

View File

@ -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)));
}
/*!