Force write settings to disk before exiting.

This commit is contained in:
sledgehammer999
2014-01-04 19:24:48 +02:00
parent 9f71dd2c61
commit 2cf7e94767
3 changed files with 7 additions and 5 deletions

View File

@@ -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();
}