qt6-bb10/tests/auto/widgets/itemviews
Volker Hilsheimer 0441526448 QAIV: reset state if removing index while editing or committing
If the commit of data to a model index result in that index getting
filtered out, then the editor will be removed as part of committing the
data, and the index that the editor is associated with becomes invalid.
The subsequent call to closeEditor() will find that the index for the
editor is no longer valid.

This should not warn, and it should also not abort the clean-up process
early. Instead, identify that the editor that we want to closed is
already hidden. In that case, skip the warning and most of the cleanup
process, and proceed directly to the EndEditHint handling further down.

Add a test that simulates the two scenarios where this can happen:
either the committing of data results in the index being filtered out
by the existing filter; or the filter changes while editing, and the
index being edited gets removed. In both cases, we don't want to see a
warning, and the state of the item view should be reset correctly.

Pick-to: 6.7 6.6 6.5
Fixes: QTBUG-115765
Change-Id: If247172fdac9a1a9279dae96c078d32553d4ee5d
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: 🌴 Alexey Edelev 🌴 <alexey.edelev@qt.io>
2023-12-14 22:59:33 +01:00
..
qabstractitemview QAIV: reset state if removing index while editing or committing 2023-12-14 22:59:33 +01:00
qcolumnview CMake: Make widgets tests standalone projects 2023-07-05 15:09:32 +02:00
qdatawidgetmapper CMake: Make widgets tests standalone projects 2023-07-05 15:09:32 +02:00
qfileiconprovider QCommonStyle: cleanup standardIcon()/standardPixmap() [2/2] 2023-10-29 12:06:24 +02:00
qheaderview QHeaderView: add test for rows/columns moved 2023-10-03 18:49:43 +00:00
qitemdelegate Tests: remove blacklisted CIs no longer available 2023-12-06 22:07:44 +01:00
qitemeditorfactory CMake: Make widgets tests standalone projects 2023-07-05 15:09:32 +02:00
qitemview CMake: Make widgets tests standalone projects 2023-07-05 15:09:32 +02:00
qlistview Tests/QListView: fix internalDragDropMove test for openSUSE 2023-10-05 19:08:45 +00:00
qlistwidget Ensure stable sort in QListWidget 2023-09-26 16:45:11 +00:00
qtableview QHeaderView: relayout on resetDefaultSectionSize 2023-11-08 18:24:17 +01:00
qtablewidget QAbstractScrollArea: Don't include size of invisible scrollbars 2023-07-11 01:34:19 +02:00
qtreeview Skip test cases that resizes window on eglfs_viv on VxWorks 2023-12-05 16:46:45 +00:00
qtreewidget QAbstractScrollArea: Don't include size of invisible scrollbars 2023-07-11 01:34:19 +02:00
qtreewidgetitemiterator CMake: Make widgets tests standalone projects 2023-07-05 15:09:32 +02:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00