mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-27 02:08:19 +03:00
Fix parent widget of "Lock qBittorrent" submenu
The parent widget of lockMenu is going to be used to derive the transient parent window. Currently the parent widget of lockMenu is the main window, therefore the main window is also going to be the transient parent for lockMenu's window handle. In other words, the "View" menu and "Lock qBittorrent" menu are going to be considered as siblings by the window manager even though the latter is nested inside the former. On platforms like wayland, such popup hierarchies are illegal, popups must be properly nested. qtwayland works around it, but it also prints warning messages. This change makes lockMenu a child of the view menu so they are properly nested from the window manager point of view. PR #19967. Closes #19955.
This commit is contained in:
parent
a57b80c7e0
commit
18ad861444
1 changed files with 1 additions and 1 deletions
|
@ -174,7 +174,7 @@ MainWindow::MainWindow(IGUIApplication *app, WindowState initialState)
|
|||
m_ui->menuLog->setIcon(UIThemeManager::instance()->getIcon(u"help-contents"_s));
|
||||
m_ui->actionCheckForUpdates->setIcon(UIThemeManager::instance()->getIcon(u"view-refresh"_s));
|
||||
|
||||
auto *lockMenu = new QMenu(this);
|
||||
auto *lockMenu = new QMenu(m_ui->menuView);
|
||||
lockMenu->addAction(tr("&Set Password"), this, &MainWindow::defineUILockPassword);
|
||||
lockMenu->addAction(tr("&Clear Password"), this, &MainWindow::clearUILockPassword);
|
||||
m_ui->actionLock->setMenu(lockMenu);
|
||||
|
|
Loading…
Reference in a new issue