summaryrefslogtreecommitdiffstats
path: root/header.LGPL-ONLY
diff options
context:
space:
mode:
authorJan Kundrát <jkt@flaska.net>2014-03-24 19:17:43 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-29 11:11:02 +0200
commit267ba8b63e0fbf02cde4d2709397ed0e12f34ee2 (patch)
tree88b667d6adcb0f93befdb19421fc3cab2fc87b83 /header.LGPL-ONLY
parent909b0de5d16f2af3b3d6a3ca4c7e53b84836ad37 (diff)
QAbstractProxyModel::sibling: treat row/column as offsets within the proxy
Qt5 allows QAIM subclasses to reimplement the sibling() method. Unfortunately, the default QAbstractProxyModel's reimplementation differs in behavior to what the Qt4 version was doing. In particular, the Qt4 version used to use the row and column as positions within the proxy model, while the Qt5 version mistakenly does this at the level of source model. This is arguably broken; the caller asks for a sibling of the proxy index, not for a sibling within the proxy model. This change makes the QAPM::sibling work explicitly in the same way as the Qt4 code behaved. The reimplementation of QAbstractProxyModel::sibling was introduced in 9dfba89c28bbff3316cb7aed6c07f90c0f2d5a22. It was subsequently fixed with commit 999109866dbd350a29cc70815d0c772545c85746 not to return indexes from the source model, but the logic was still different from the Qt4 version. [ChangeLog][QtCore][QAbstractProxyModel] Fixed QAbstractProxyModel::sibling to work in the same manner as the Qt4 code used to behave. Previously, Qt5's implementation would treat the row and column as positions in the source model instead of a position in the proxy itself. Followup-to 9dfba89c28bbff3316cb7aed6c07f90c0f2d5a22 and 999109866dbd350a29cc70815d0c772545c85746 Change-Id: Ia25027b2ad9e4777ba28de2d2226d48f8cccf587 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'header.LGPL-ONLY')
0 files changed, 0 insertions, 0 deletions