QMenu: clear popup screen after exec()
bb108cd7a3d472remembered the current screen in QMenuPrivate::popupScreen. This QPointer member is not reset, after QMenu:exec(), which makes a re-used menu remember the wrong screen, if its next usage happens on another screen. Reset the member variable at the end of QMenuPrivate::exec(). This amends8cd7a3d472. Fixes: QTBUG-118434 Pick-to: 6.7 6.6 6.5 Change-Id: I7457ca72166346f01cf71b2706ebc20ecd71173c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
parent
32e2386b15
commit
7aedcdefb8
|
|
@ -2674,6 +2674,7 @@ QAction *QMenuPrivate::exec(const QPoint &p, QAction *action, PositionFunction p
|
|||
action = syncAction;
|
||||
syncAction = nullptr;
|
||||
eventLoop = nullptr;
|
||||
popupScreen.clear();
|
||||
return action;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue