qt6-bb10/tests/auto/widgets
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
..
dialogs Return button index for deprecated QMessageBox APIs 2024-06-06 10:37:23 +00:00
effects Change license for tests files 2024-02-04 09:56:42 +01:00
graphicsview Fix MouseButtonDblClick synthesis from touch double-tap 2024-06-11 16:36:38 +00:00
itemviews QTableView: optimize selection when spans are present 2024-06-19 02:40:18 +00:00
kernel Fix MouseButtonDblClick synthesis from touch double-tap 2024-06-11 16:36:38 +00:00
styles QTBUG36933_brokenPseudoClassLookup() remove setActiveWindow() 2024-04-26 18:19:38 +02:00
util Use /tmp in tst_qcompleter on VxWorks 2024-06-12 15:53:35 +00:00
widgets Add tst_QMenuBar::pressDragRelease 2024-05-31 16:35:53 -07:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00