mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 06:28:03 -06:00
Second attempt at fixing saving settings on shutdown.
This commit is contained in:
@@ -41,6 +41,7 @@ class HeadlessLoader: public QObject {
|
||||
|
||||
public:
|
||||
HeadlessLoader(const QStringList &torrentCmdLine) {
|
||||
connect(static_cast<SessionApplication*>(qApp), SIGNAL(aboutToQuit()), this, SLOT(deleteBTSession()), Qt::DirectConnection);
|
||||
Preferences pref;
|
||||
// Enable Web UI
|
||||
pref.setWebUiEnabled(true);
|
||||
@@ -61,11 +62,11 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
~HeadlessLoader() {
|
||||
public slots:
|
||||
void deleteBTSession() {
|
||||
QBtSession::drop();
|
||||
}
|
||||
|
||||
public slots:
|
||||
// Call this function to exit qBittorrent headless loader
|
||||
// and return to prompt (object will be deleted by main)
|
||||
void exit() {
|
||||
|
||||
Reference in New Issue
Block a user