qt5base-lts/tests/auto
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
..
bic/data Add binary compatibility file built against 6.5.0 2023-04-19 15:40:36 +00:00
cmake CMake: Fix config condition evaluator 2023-09-21 21:46:46 +02:00
concurrent tst_QtConcurrentMedian: compile with QT_NO_FOREACH 2023-08-19 16:28:20 +03:00
corelib QFile::moveToTrash: fix error reporting on Windows 2023-09-24 14:10:56 -07:00
dbus QDBusMarshall test: avoid an atomic assignment 2023-09-14 18:39:24 +02:00
gui Support loading variable fonts as application fonts in Freetype 2023-09-20 21:37:50 +02:00
guiapplauncher Move Weather Anchor Layout example to manual tests 2023-03-02 05:55:57 +01:00
network Update public suffix list 2023-09-20 22:33:18 +02:00
opengl tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
other Silence compiler warning 2023-09-22 20:40:36 +02:00
printsupport Dialogs: clean up native dialogs when object gets destroyed 2023-09-06 23:12:33 +02:00
shared Support loading variable fonts as application fonts in Freetype 2023-09-20 21:37:50 +02:00
sql tst_qvfssql: Don't use appless main 2023-08-11 15:45:36 +02:00
testlib tst_QAbstractItemModelTester: fix unittest 2023-09-08 19:17:36 +03:00
tools tst_qmakelib: compile with QT_NO_FOREACH 2023-08-19 19:17:17 +03:00
wasm CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
widgets QAbstractItemDelegate: Update spinbox editor value before committing 2023-09-25 15:12:05 +02:00
xml CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
CMakeLists.txt CI: Enable some tests under corelib/thread for Wasm platform 2023-09-14 11:58:48 +02:00
network-settings.h QtNetworkSettings: narrow down hasIPv6 to specific OSes 2023-08-29 07:20:51 -07:00