qt5base-lts/tests/auto/widgets
Doris Verria faae3dc6b1 QAbstractItemDelegate: Update spinbox editor value before committing
QAbstractItemView installs the delegate as an event filter on the
editor, so the delegate will get the focusOut event (and other
events) before the editor does. QAbstractItemDelegate will then
emit commitData, signaling that the "updated" data should be
written back to the model.
In the case where the editor of a delegate (QAbstractItemDelegate)
is a QSpinBox with keyboardTracking set to false, the value of
the spinbox won't be updated while typing, but only when the
spinbox's text edit focus is lost. In this case, the delegate's
commitData will be emitted before the spinbox has had a chance
to update the value in its handling of the focusOut event.
To fix, make sure to update the value before the data is
committed to the model in the delegate's tryFixup method.

Fixes: QTBUG-116926
Pick-to: 6.5 6.6
Change-Id: I68540964342407d23387e4404a0fe3f00d80eb5f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-25 15:12:05 +02:00
..
dialogs Dialogs: clean up native dialogs when object gets destroyed 2023-09-06 23:12:33 +02:00
effects Stabilize tst_QGraphicsEffect::draw() 2023-08-25 09:04:37 +02:00
graphicsview QtWidgets tests: port remaining users away from Q_FOREACH 2023-08-14 23:11:54 +03:00
itemviews QAbstractItemDelegate: Update spinbox editor value before committing 2023-09-25 15:12:05 +02:00
kernel QtWidgets tests: port remaining users away from Q_FOREACH 2023-08-14 23:11:54 +03:00
styles Reset palette resolve mask in windows vista style 2023-09-05 10:59:00 +02:00
util Remove redundant QPair includes 2023-09-06 17:24:40 +00:00
widgets QDockWidget: ignore close event if DockWidgetClosable is not set 2023-09-21 18:36:06 +02:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00