mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 08:16:16 -07:00
Correctly replace desktop integration menu
This commit is contained in:
parent
15515200ee
commit
d27dd85dfd
1 changed files with 3 additions and 1 deletions
|
@ -754,10 +754,12 @@ try
|
|||
});
|
||||
|
||||
disconnect(m_desktopIntegration, &DesktopIntegration::activationRequested, this, &Application::createStartupProgressDialog);
|
||||
delete m_desktopIntegration->menu();
|
||||
// we must not delete menu while it is used by DesktopIntegration
|
||||
auto *oldMenu = m_desktopIntegration->menu();
|
||||
const MainWindow::State windowState = (!m_startupProgressDialog || (m_startupProgressDialog->windowState() & Qt::WindowMinimized))
|
||||
? MainWindow::Minimized : MainWindow::Normal;
|
||||
m_window = new MainWindow(this, windowState);
|
||||
delete oldMenu;
|
||||
delete m_startupProgressDialog;
|
||||
#ifdef Q_OS_WIN
|
||||
auto *pref = Preferences::instance();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue