Clean program exit on system shutdown/log out

This commit is contained in:
Christophe Dumez
2010-10-01 20:05:54 +00:00
parent 6e18d780ba
commit a3f3287e24
8 changed files with 73 additions and 16 deletions

View File

@@ -165,6 +165,7 @@ Bittorrent::~Bittorrent() {
#endif
saveSessionState();
saveFastResumeData();
qDebug("Deleting the session");
// Delete session
session_proxy sp = s->abort();
delete s;
@@ -1541,6 +1542,7 @@ void Bittorrent::saveTempFastResumeData() {
// Only save fast resume data for unfinished and unpaused torrents (Optimization)
// Called periodically and on exit
void Bittorrent::saveFastResumeData() {
qDebug("Saving fast resume data...");
// Stop listening for alerts
resumeDataTimer.stop();
timerAlerts->stop();