qt6-bb10/tests/auto/widgets
Axel Spoerl 2d4993899f Widgets focus abstraction: Fix re-parenting
Focus abstraction in 58d5d4b7c2 was
supposed to be behavior-neutral. QWidgetPrivate::reparentFocusChildren
used QObject::findChildren() to find children inside and outside the
current focus chain. If the re-parented widget had only direct children
and the focus chain was equal to creation-order, the result was
identical to previous behavior.

When the re-parented widget had grandchildren, the behavior differred.
While not being detected by existing tests, it caused a regression.

Re-implement the previous logic: Iterate through the focus chain,
instead of relying on QObject::findChildren() returning a complete and
well-ordered list.

Modify tst_QWidget::focusChainOnReparent() in order to cover the
regression.

This amends 58d5d4b7c2.

Fixes: QTBUG-125257
Change-Id: Iff4f1d0d9b6117c50c8980dfb6eebfc6f6d4a710
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-05-23 01:12:32 +02:00
..
dialogs tst_QFileDialog2::dontShowCompleterOnRoot() remove setActiveWindow() 2024-04-26 18:59:53 +02:00
effects Change license for tests files 2024-02-04 09:56:42 +01:00
graphicsview QSizeF: add qFuzzyCompare and qFuzzyIsNull overloads 2024-05-14 14:33:21 +02:00
itemviews QTBUG14363_completerWithAnyKeyPressedEditTriggers remove setActiveWindo 2024-04-30 21:28:22 +02:00
kernel Widgets focus abstraction: Fix re-parenting 2024-05-23 01:12:32 +02:00
styles QTBUG36933_brokenPseudoClassLookup() remove setActiveWindow() 2024-04-26 18:19:38 +02:00
util QCompleter: Hide popup when widget is hidden 2024-04-30 16:30:16 +00:00
widgets tst_QSpinBox::editingFinished() remove setActiveWindow() 2024-05-08 13:02:32 +02:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00