From: Mark Brand Date: Fri, 2 Nov 2012 20:49:44 +0000 (+0100) Subject: QIdentityProxyModel: fix sibling() reimplementation X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e5ac4fb9b236c782e3ed6f15044eb9956246931a;p=profile%2Fivi%2Fqtbase.git 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 --- diff --git a/src/corelib/itemmodels/qidentityproxymodel.cpp b/src/corelib/itemmodels/qidentityproxymodel.cpp index 75a1c0d..3dbe93b 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))); } /*!