mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-02 09:55:55 +00:00
parent
71e53a4628
commit
5b269a782a
@ -50,6 +50,7 @@
|
|||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
|
|
||||||
#ifndef DISABLE_GUI
|
#ifndef DISABLE_GUI
|
||||||
|
#include <QMenu>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QPixmapCache>
|
#include <QPixmapCache>
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
@ -973,6 +974,14 @@ void Application::cleanup()
|
|||||||
LogMsg(tr("qBittorrent termination initiated"));
|
LogMsg(tr("qBittorrent termination initiated"));
|
||||||
|
|
||||||
#ifndef DISABLE_GUI
|
#ifndef DISABLE_GUI
|
||||||
|
if (m_desktopIntegration)
|
||||||
|
{
|
||||||
|
m_desktopIntegration->disconnect();
|
||||||
|
m_desktopIntegration->setToolTip(tr("qBittorrent is shutting down..."));
|
||||||
|
if (m_desktopIntegration->menu())
|
||||||
|
m_desktopIntegration->menu()->setEnabled(false);
|
||||||
|
}
|
||||||
|
|
||||||
if (m_window)
|
if (m_window)
|
||||||
{
|
{
|
||||||
// Hide the window and don't leave it on screen as
|
// Hide the window and don't leave it on screen as
|
||||||
|
@ -481,6 +481,7 @@ MainWindow::MainWindow(IGUIApplication *app, QWidget *parent)
|
|||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
{
|
{
|
||||||
|
app()->desktopIntegration()->setMenu(nullptr);
|
||||||
delete m_ui;
|
delete m_ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1171,11 +1172,6 @@ void MainWindow::closeEvent(QCloseEvent *e)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disable some UI to prevent user interactions
|
|
||||||
app()->desktopIntegration()->disconnect();
|
|
||||||
app()->desktopIntegration()->setToolTip(tr("qBittorrent is shutting down..."));
|
|
||||||
app()->desktopIntegration()->menu()->setEnabled(false);
|
|
||||||
|
|
||||||
// Accept exit
|
// Accept exit
|
||||||
e->accept();
|
e->accept();
|
||||||
qApp->exit();
|
qApp->exit();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user