mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-25 22:14:32 +00:00
Do cleanup work in an earlier stage to ensure correct conf saving.
This commit is contained in:
parent
1648cdc4bc
commit
e380a17c82
@ -337,18 +337,14 @@ MainWindow::MainWindow(QWidget *parent, const QStringList& torrentCmdLine) : QMa
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::deleteBTSession() {
|
void MainWindow::deleteBTSession() {
|
||||||
guiUpdater->stop();
|
|
||||||
status_bar->stopTimer();
|
|
||||||
QBtSession::drop();
|
|
||||||
m_pwr->setActivityState(false);
|
|
||||||
// Save window size, columns size
|
|
||||||
writeSettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Destructor
|
|
||||||
MainWindow::~MainWindow() {
|
|
||||||
qDebug("GUI destruction");
|
qDebug("GUI destruction");
|
||||||
hide();
|
hide();
|
||||||
|
guiUpdater->stop();
|
||||||
|
status_bar->stopTimer();
|
||||||
|
m_pwr->setActivityState(false);
|
||||||
|
QBtSession::drop();
|
||||||
|
// Save window size, columns size
|
||||||
|
writeSettings();
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_WS_MAC
|
||||||
// Workaround to avoid bug http://bugreports.qt.nokia.com/browse/QTBUG-7305
|
// Workaround to avoid bug http://bugreports.qt.nokia.com/browse/QTBUG-7305
|
||||||
setUnifiedTitleAndToolBarOnMac(false);
|
setUnifiedTitleAndToolBarOnMac(false);
|
||||||
@ -381,15 +377,12 @@ MainWindow::~MainWindow() {
|
|||||||
delete properties;
|
delete properties;
|
||||||
delete hSplitter;
|
delete hSplitter;
|
||||||
delete vSplitter;
|
delete vSplitter;
|
||||||
if (systrayCreator) {
|
if (systrayCreator)
|
||||||
delete systrayCreator;
|
delete systrayCreator;
|
||||||
}
|
if (systrayIcon)
|
||||||
if (systrayIcon) {
|
|
||||||
delete systrayIcon;
|
delete systrayIcon;
|
||||||
}
|
if (myTrayIconMenu)
|
||||||
if (myTrayIconMenu) {
|
|
||||||
delete myTrayIconMenu;
|
delete myTrayIconMenu;
|
||||||
}
|
|
||||||
delete tabs;
|
delete tabs;
|
||||||
// Keyboard shortcuts
|
// Keyboard shortcuts
|
||||||
delete switchSearchShortcut;
|
delete switchSearchShortcut;
|
||||||
@ -397,7 +390,7 @@ MainWindow::~MainWindow() {
|
|||||||
delete switchTransferShortcut;
|
delete switchTransferShortcut;
|
||||||
delete switchRSSShortcut;
|
delete switchRSSShortcut;
|
||||||
IconProvider::drop();
|
IconProvider::drop();
|
||||||
qDebug("Exiting GUI destructor...");
|
qDebug("Finished GUI destruction");
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::defineUILockPassword() {
|
void MainWindow::defineUILockPassword() {
|
||||||
|
@ -72,7 +72,6 @@ class MainWindow : public QMainWindow, private Ui::MainWindow{
|
|||||||
public:
|
public:
|
||||||
// Construct / Destruct
|
// Construct / Destruct
|
||||||
MainWindow(QWidget *parent=0, const QStringList& torrentCmdLine = QStringList());
|
MainWindow(QWidget *parent=0, const QStringList& torrentCmdLine = QStringList());
|
||||||
~MainWindow();
|
|
||||||
// Methods
|
// Methods
|
||||||
QWidget* getCurrentTabWidget() const;
|
QWidget* getCurrentTabWidget() const;
|
||||||
TransferListWidget* getTransferList() const { return transferList; }
|
TransferListWidget* getTransferList() const { return transferList; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user