path: root/src/widgets/widgets/qmenubar_p.h
diff options
authorFelix Bourbonnais <>2016-05-10 10:06:53 -0400
committerFélix Bourbonnais <>2016-05-18 17:40:11 +0000
commitb627dd2c24c5962c1e8f9d72bcbe9ebdfe6dfceb (patch)
tree023ef119b84d4967e21a8b8bd1b9b74927c05fb1 /src/widgets/widgets/qmenubar_p.h
parentf095ff85c5c3798161146244e2d5ed8f4724145c (diff)
QMenuBar: nested parenting fix
QMenuBar now receives a parent changed event for each of its parent, grand-parent, ... This fixes a crash caused by an invalid QWidget pointer and makes sure the keyboard shortcuts events are relayed to the menu bar in all parenting/re-parenting cases by installing an event filter on each parent Task-number: QTBUG-53205 Change-Id: I419e6cbc52e28a67fb08a848a7161b4cb8ae4ae5 Reviewed-by: Gabriel de Dietrich <> Reviewed-by: Błażej Szczygieł <>
Diffstat (limited to 'src/widgets/widgets/qmenubar_p.h')
1 files changed, 1 insertions, 2 deletions
diff --git a/src/widgets/widgets/qmenubar_p.h b/src/widgets/widgets/qmenubar_p.h
index ee615e71f3..7ef696f50e 100644
--- a/src/widgets/widgets/qmenubar_p.h
+++ b/src/widgets/widgets/qmenubar_p.h
@@ -128,8 +128,7 @@ public:
// reparenting
void handleReparent();
- QWidget *oldParent;
- QWidget *oldWindow;
+ QVector<QPointer<QWidget> > oldParents;
QList<QAction*> hiddenActions;
//default action