From 141618660fc99603db50aed0f8a1809a66a3de0e Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sat, 26 Mar 2011 08:40:00 +0000 Subject: [PATCH] Sync program preferences before computer shutdown to avoid loss --- Changelog | 1 + src/qtlibtorrent/qbtsession.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Changelog b/Changelog index 335c4af54..a15149eee 100644 --- a/Changelog +++ b/Changelog @@ -3,6 +3,7 @@ - BUGFIX: Fix possible crash when changing the priority of a file - BUGFIX: Magnet link association fix on Win32 (sledgehammer999) - BUGFIX: Easier compilation on Win32 using MinGW (sledgehammer999) + - BUGFIX: Sync program preferences before computer shutdown to avoid loss - I18N: Updated German, Italian, Hungarian, Portuguese, Brazilian, Spanish and Catalan translations diff --git a/src/qtlibtorrent/qbtsession.cpp b/src/qtlibtorrent/qbtsession.cpp index 296a3f5d1..4c2f781ac 100644 --- a/src/qtlibtorrent/qbtsession.cpp +++ b/src/qtlibtorrent/qbtsession.cpp @@ -2111,6 +2111,8 @@ void QBtSession::readAlerts() { saveSessionState(); qDebug("Saving fast resume data"); saveFastResumeData(); + // Make sure preferences are synced before exiting + pref.sync(); qDebug("Sending computer shutdown/suspend signal"); misc::shutdownComputer(suspend); }