qt6-bb10/tests/auto/corelib
Jan Kundrát 267ba8b63e 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
9dfba89c28. It was subsequently fixed with commit
999109866d 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 9dfba89c28 and
999109866d
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>
2014-05-29 11:11:02 +02:00
..
animation tst_qpauseanimation: Fix condition in QEXPECT_FAIL. 2014-01-30 22:10:22 +01:00
codecs Merge remote-tracking branch 'origin/release' into stable 2014-05-14 12:37:34 +02:00
global Mark some tests as XFAIL on QNX 2014-03-27 08:21:14 +01:00
io Skip tst_QLockFile::noPermissions 2014-05-19 19:33:15 +02:00
itemmodels QAbstractProxyModel::sibling: treat row/column as offsets within the proxy 2014-05-29 11:11:02 +02:00
json Mark some tests as XFAIL on QNX 2014-03-27 08:21:14 +01:00
kernel Re-add missing test to kernel.pro 2014-04-02 03:07:12 +02:00
mimetypes test: Don't build qmimedatabase-cache for QNX 2014-01-16 16:11:04 +01:00
plugin qcompilerdetection.h: add Q_COMPILER_UNIFORM_INIT 2013-11-15 06:30:53 +01:00
statemachine don't erroneously claim that gui support is needed 2013-10-16 17:10:15 +02:00
thread Fix tst_qthreadpool under high load. 2014-03-14 22:38:49 +01:00
tools QNX: Make QDateTime "daylightTransitions" auto test pass 2014-05-14 09:12:39 +02:00
xml Check for network module when building according auto tests 2013-02-19 19:20:53 +01:00
corelib.pro iOS: Enable building of basic tests 2014-01-22 12:35:17 +01:00