diff --git a/src/GUI.cpp b/src/GUI.cpp index c3d4b155c..1abe6a616 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -286,10 +286,8 @@ GUI::~GUI() { delete switchTransferShortcut; delete switchRSSShortcut; // Delete BTSession objects + qDebug("Deleting BTSession"); delete BTSession; - // Deleting remaining top level widgets - qDebug("Deleting remaining top level widgets"); - // May freeze for a few seconds after the next line // because the Bittorrent session proxy will // actually be deleted now and destruction diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 40f03b867..1c9d970ee 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -2049,12 +2049,16 @@ void Bittorrent::addConsoleMessage(QString msg, QString) { #if LIBTORRENT_VERSION_MINOR < 15 saveDHTEntry(); #endif + qDebug("Saving session state"); saveSessionState(); + qDebug("Saving fast resume data"); saveFastResumeData(); + qDebug("Deleting the session"); delete s; + qDebug("Sending computer shutdown signal"); misc::shutdownComputer(); - exiting = true; - qApp->exit(); + qDebug("Exiting the application"); + exit(0); } } } diff --git a/src/main.cpp b/src/main.cpp index 808dac51f..194191e18 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -308,7 +308,7 @@ int main(int argc, char *argv[]){ #endif int ret = app.exec(); - + qDebug("Application has exited"); return ret; }