Second attempt at fixing saving settings on shutdown.

This commit is contained in:
sledgehammer999
2013-12-22 23:09:25 +02:00
parent ada76381a1
commit 09aa930142
4 changed files with 4 additions and 17 deletions

View File

@@ -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() {