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 to9dfba89c28
ande5ac4fb9b2
Change-Id: I25cd7baa4a93284ab14ede988ac524971870794e Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This commit is contained in:
parent
6e8f26a645
commit
999109866d
@ -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)));
|
||||
}
|
||||
|
||||
/*!
|
||||
|
Loading…
Reference in New Issue
Block a user