summaryrefslogtreecommitdiffstats
path: root/src/gui/accessible
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2021-09-24 23:33:27 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2021-09-28 17:42:57 +0200
commit223066d4319d611e724da69089c8f49d525a2566 (patch)
tree2f103445b1ff04db0aaef7020a45327fefbce880 /src/gui/accessible
parent5e2725772aa25e0ee95269c8f996fdb7bc4705e7 (diff)
Don't clear focus if setParent doesn't change the parent
QWidget::setParent might be called to change the window flags, without changing the parent. For those cases, we don't have to clear the focus. Decouple the newParent state from the wasCreated flag. In most places where newParent was tested, wasCreated was either tested previously and can't be false anyway, or the code executed is irrelevant for widgets that are not yet created (there can't be a paint manager). In the remaining case, test wasCreated explicitly to maintain existing logic. Add test for the cases where the previous code broke the focus, both for QWidget and QDialog. Fixes: QTBUG-93005 Pick-to: 6.2 Change-Id: I39dc179c2d348054de3927aa8b69eecef4935511 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
Diffstat (limited to 'src/gui/accessible')
0 files changed, 0 insertions, 0 deletions