mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-21 16:07:23 -06:00
Force write settings to disk before exiting.
This commit is contained in:
@@ -41,7 +41,7 @@ class HeadlessLoader: public QObject {
|
||||
|
||||
public:
|
||||
HeadlessLoader(const QStringList &torrentCmdLine) {
|
||||
connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(deleteBTSession()), Qt::DirectConnection);
|
||||
connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(shutdownCleanUp()), Qt::DirectConnection);
|
||||
Preferences pref;
|
||||
// Enable Web UI
|
||||
pref.setWebUiEnabled(true);
|
||||
@@ -63,7 +63,8 @@ public:
|
||||
}
|
||||
|
||||
public slots:
|
||||
void deleteBTSession() {
|
||||
void shutdownCleanUp() {
|
||||
Preferences().sync();
|
||||
QBtSession::drop();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user