qt6-bb10/tests/auto/widgets/itemviews
Volker Hilsheimer 38f08eec14 QTableView: optimize selection when spans are present
If a span is selected, we used to assume that rows and columns might be
moved, and made a selection with a range for each cell in the span. This
resulted in very large selection models.

We already had optimized the case that we didn't have any moved rows or
columns, skipping the mapping for the respective (or, usually, both)
directions and just making a single range. Apply that same optimization
for the case where a span exists and intersects with the selection area.

Avoid code duplication by only updating the top/left/bottom/right values
depending on the configuration of the table, and then create the
selection based on those.

Adapt the test case; we now get a single range, even when a span is
present, and the range includes all cells included in the span. Add a
debug streaming operator in the test case, as there is none implemented
in QTableWidgetSelectionRange, to ease debugging. That operator can
become a hidden friend of QTableWidgetSelectionRange in a follow-up
commit.

Pick-to: 6.7 6.5
Fixes: QTBUG-119076
Change-Id: If699463944ca2abaed8f93a2cd3ea30f33b79145
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 57d209c4fdea4766f24479a1f20c2975d34a1a0f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-19 02:40:18 +00:00
..
qabstractitemview tst_QAbstractItemView::QTBUG31411_noSelection() remove setActiveWindow() 2024-04-29 21:26:18 +02:00
qcolumnview Change license for tests files 2024-02-04 09:56:42 +01:00
qdatawidgetmapper textEditDoesntChangeFocusOnTab_qtbug3305() remove setActiveWindow() 2024-04-30 18:30:15 +02:00
qfileiconprovider Change license for tests files 2024-02-04 09:56:42 +01:00
qheaderview tst_QHeaderview::statusTips() remove setActiveWindow() 2024-04-29 21:20:25 +02:00
qitemdelegate tst_QItemDelegate::task257859_finalizeEdit() remove setActiveWindow() 2024-04-29 21:20:26 +02:00
qitemeditorfactory Change license for tests files 2024-02-04 09:56:42 +01:00
qitemview Change license for tests files 2024-02-04 09:56:42 +01:00
qlistview tst_QListView::moveLastRow remove QApplicationPrivate::setActiveWindow 2024-04-26 19:26:07 +02:00
qlistwidget QTBUG14363_completerWithAnyKeyPressedEditTriggers remove setActiveWindo 2024-04-30 21:28:22 +02:00
qtableview tst_QTableView::keyboardNavigation() remove setActiveWindow() 2024-04-30 21:28:21 +02:00
qtablewidget QTableView: optimize selection when spans are present 2024-06-19 02:40:18 +00:00
qtreeview tst_QTreeView::statusTip() remove QApplicationPrivate::setActiveWindow 2024-04-26 17:37:56 +02:00
qtreewidget Remove extra semi-colons 2024-02-06 20:17:18 +09:00
qtreewidgetitemiterator Change license for tests files 2024-02-04 09:56:42 +01:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00