Browse Source

Correctly replace desktop integration menu

adaptive-webui-19844
Vladimir Golovnev (Glassez) 2 years ago
parent
commit
d27dd85dfd
No known key found for this signature in database
GPG Key ID: 52A2C7DEE2DFA6F7
  1. 4
      src/app/application.cpp

4
src/app/application.cpp

@ -754,10 +754,12 @@ try
}); });
disconnect(m_desktopIntegration, &DesktopIntegration::activationRequested, this, &Application::createStartupProgressDialog); 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)) const MainWindow::State windowState = (!m_startupProgressDialog || (m_startupProgressDialog->windowState() & Qt::WindowMinimized))
? MainWindow::Minimized : MainWindow::Normal; ? MainWindow::Minimized : MainWindow::Normal;
m_window = new MainWindow(this, windowState); m_window = new MainWindow(this, windowState);
delete oldMenu;
delete m_startupProgressDialog; delete m_startupProgressDialog;
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
auto *pref = Preferences::instance(); auto *pref = Preferences::instance();

Loading…
Cancel
Save