qt6-bb10/tests/auto/widgets
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
..
dialogs Purge empty BLACKLIST files from tests 2023-11-24 18:09:16 +01:00
effects Stabilize tst_QGraphicsEffect::draw() 2023-08-25 09:04:37 +02:00
graphicsview Android: Skip focusProxy_QTBUG_51856() test case temporarily 2023-12-07 10:56:43 +02:00
itemviews QAIV: reset state if removing index while editing or committing 2023-12-14 22:59:33 +01:00
kernel Android: Skip showAndMoveChild() test case temporarily 2023-12-07 10:56:43 +02:00
styles Reset palette resolve mask in windows vista style 2023-09-05 10:59:00 +02:00
util Tests: remove blacklisted CIs no longer available 2023-12-06 22:07:44 +01:00
widgets QLineEdit: Use existing selection when deleting a word 2023-12-14 19:25:16 +00:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00