From 999109866dbd350a29cc70815d0c772545c85746 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Thu, 8 Nov 2012 01:54:13 +0100 Subject: 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 9dfba89c28bbff3316cb7aed6c07f90c0f2d5a22 and e5ac4fb9b236c782e3ed6f15044eb9956246931a Change-Id: I25cd7baa4a93284ab14ede988ac524971870794e Reviewed-by: Stephen Kelly --- src/corelib/itemmodels/qabstractproxymodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/itemmodels/qabstractproxymodel.cpp b/src/corelib/itemmodels/qabstractproxymodel.cpp index 9b8c11af12..cdf811e29b 100644 --- a/src/corelib/itemmodels/qabstractproxymodel.cpp +++ b/src/corelib/itemmodels/qabstractproxymodel.cpp @@ -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))); } /*! -- cgit v1.2.3