qt5base-lts/tests/auto/corelib/itemmodels/qitemselectionmodel
Filippo Cucchetto be0a221ae4 Fix missing handling of columns when merging selection ranges
This commit fixes two bugs:
1) Two ranges should not be merged if they are of different columns.
The old code would have merged (0,0) with (1, 1). Tranforming a selection
of just two indexes in a rectangle of four indexes.
2) The QItemSelectionRange appended had wrong column and worked only for
indexes of the first column. For example if 'tl' was (0, 1) than br was (0, 1)
so the QItemSelectionRange would have be ((0,1), (0, 1-1)) so ((0,1), (0,0)).
This QItemSelectionRange is invalid because topLeft columns is greater than
bottomRight column. The fix take in consideration the bottomRight column.

Task-number: QTBUG-58871
Change-Id: I591ef0bcc63926f24a7b1ced002af9b7737a4b6e
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2017-05-09 13:46:51 +00:00
..
.gitignore Move proxy and selection models to QtCore. 2011-12-16 13:00:57 +01:00
qitemselectionmodel.pro Tests: Remove CONFIG += parallel_test. 2015-09-05 07:16:50 +00:00
tst_qitemselectionmodel.cpp Fix missing handling of columns when merging selection ranges 2017-05-09 13:46:51 +00:00