summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkreplywasmimpl.cpp
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2024-06-10 16:24:43 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2024-06-11 21:16:45 +0200
commitb17703171ccea8d5f76cf07f4c854c2d2aaf7ee8 (patch)
tree5656a6c135eb82a830577aa11bfa5b812c9be4ad /src/network/access/qnetworkreplywasmimpl.cpp
parent909493bae27eeb55c985aa9522a57bc4e60d0893 (diff)
QWidget: do not send hide events to hidden children
The logic in QWidgetPrivate::hideChildren sends hide events to all of its children, including the ones that are already hidden (and thus have received already a hide event). This breaks some "event counting" logic in QGraphicsScene, which (since it can be displayed in multiple views) keeps track of how many hide/show events it has received. It is possible to break this counter by having it receive several hide events in a row, which won't be matched by the same number of show events. These extra hide events may be generated by adding a QGraphicsView into a QTabWidget (or QStackedWidget), hiding *that*, and then changing the current index -- which shows/hides the children. This makes the counter go negative and break. Furthermore, a hide event is received after the widget has been made invisible, therefore one can't check for "was I visible when I received this hide event?" This commit changes the logic in QWidgetPrivate::hideChildren so that we don't do anything if the a child was already not visible. [ChangeLog][QtWidgets][QWidget] Widgets which are already hidden no longer receive hide events if they're made hidden again (for instance because an ancestor gets hidden). Change-Id: I73061b9d8bf33911778c9c30df33dbe43e9deaa3 Fixes: QTBUG-53974 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/network/access/qnetworkreplywasmimpl.cpp')
0 files changed, 0 insertions, 0 deletions