1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 07:18:08 +00:00

Destroy desktop integration at correct place

Otherwise it is destructed in QObject destructor, i.e. after GUI application is already destructed.
This can be related to some problems with system tray icon.

PR #18108.
Closes #18093.
This commit is contained in:
Vladimir Golovnev 2022-11-30 20:09:51 +03:00 committed by GitHub
parent 12b58be8c2
commit 25ea0d274b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -706,7 +706,7 @@ try
#ifndef DISABLE_GUI
UIThemeManager::initInstance();
m_desktopIntegration = new DesktopIntegration(this);
m_desktopIntegration = new DesktopIntegration;
m_desktopIntegration->setToolTip(tr("Loading torrents..."));
#ifndef Q_OS_MACOS
auto *desktopIntegrationMenu = new QMenu;
@ -1201,6 +1201,7 @@ void Application::cleanup()
::ShutdownBlockReasonDestroy(reinterpret_cast<HWND>(m_window->effectiveWinId()));
#endif // Q_OS_WIN
delete m_window;
delete m_desktopIntegration;
UIThemeManager::freeInstance();
}
#endif // DISABLE_GUI