forked from qt-creator/qt-creator
Set parents for menus in the main menu bar
Shouldn't be necessary because the MenuActionContainer takes care of deletion if it wasn't deleted before, but works around issues with placing menu popups with Qt Wayland (QTBUG-68636) Task-number: QTCREATORBUG-20516 Change-Id: Ib1d393abc78b145905429e64f8bf7541af75bdad Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Robert Loehning <robert.loehning@qt.io>
This commit is contained in:
@@ -403,6 +403,7 @@ void MenuActionContainer::insertAction(QAction *before, QAction *action)
|
||||
|
||||
void MenuActionContainer::insertMenu(QAction *before, QMenu *menu)
|
||||
{
|
||||
menu->setParent(m_menu, menu->windowFlags()); // work around issues with Qt Wayland (QTBUG-68636)
|
||||
m_menu->insertMenu(before, menu);
|
||||
}
|
||||
|
||||
@@ -509,6 +510,7 @@ void MenuBarActionContainer::insertAction(QAction *before, QAction *action)
|
||||
|
||||
void MenuBarActionContainer::insertMenu(QAction *before, QMenu *menu)
|
||||
{
|
||||
menu->setParent(m_menuBar, menu->windowFlags()); // work around issues with Qt Wayland (QTBUG-68636)
|
||||
m_menuBar->insertMenu(before, menu);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user