qt5base-lts/tests/auto/widgets
Mitch Curtis a18e3a3cef Fix key navigation through cells with spans in QTableView.
When navigating with the directional keys or tab/backtab, there are
certain situations where the cell that is edited is incorrect.
For example, consider the table below.

 '^' represents the starting cell and the direction of navigation.
 'c' represents the index that is arrived at as the currentIndex prior to this patch as
reported by view.selectionModel()->currentIndex().
 'x' is the cell that should be edited:

+---+---+---+---+
|   |   | e |   |
+---+---+---+---+
|   | x     |   |
+---+       +---+
|   |     c |   |
+---+---+---+---+
|   |   | ^ |   |
+---+---+---+---+

Before this patch, the cell that will actually be edited is c, rather
than x, so after editing the cell and pressing enter, the previous
contents of the cell will still be shown.

With this patch, currentIndex() will be changed after every call to
cursorMove(). Navigation into and out of cells is not affected because
the visualCursor member in the QTableViewPrivate tracks the keyboard
navigation entry point. If after the up navigation into the span, the
user presses up, the cell entered is 'e', not the cell above 'x'.

Task-number: QTBUG-29239

[ChangeLog][QtWidgets][QTableView][QTableWidget] currentIndex() now
reflects the top left cell when in a span.

Change-Id: I3dc3db46ebba340102860fc4ad98fcaf91484983
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2014-06-06 15:50:58 +02:00
..
dialogs QFileDialog: Return empty QUrl from the static get..FileUrl() functions. 2014-05-06 16:35:56 +02:00
effects QtWidgets tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 2013-03-28 02:02:14 +01:00
graphicsview Merge remote-tracking branch 'origin/stable' into dev 2014-05-06 16:50:03 +02:00
itemviews Fix key navigation through cells with spans in QTableView. 2014-06-06 15:50:58 +02:00
kernel qpa: Rename qwidgetwindow_qpa_p.h to qwidgetwindow_p.h 2014-05-20 00:20:02 +02:00
styles Fix tst_QStyleSheetStyle::toolTip(). 2014-05-08 09:36:21 +02:00
util QNX: Fix QCompleter autotest 2014-04-09 20:53:06 +02:00
widgets Merge remote-tracking branch 'origin/stable' into dev 2014-05-22 07:46:17 +02:00
widgets.pro Moved tests into integrationtests/ and widgets/ 2011-10-20 19:45:41 +02:00