From 9202ce8757f10e0aab2b1a0fceaa932342944109 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Wed, 10 Mar 2010 20:08:43 +0000 Subject: [PATCH] Deleting windows that are possibly still open on exit --- src/GUI.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/GUI.cpp b/src/GUI.cpp index b476e19a1..2961a85ac 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -251,6 +251,12 @@ GUI::~GUI() { delete switchRSSShortcut; // Delete BTSession objects delete BTSession; + // Deleting remaining top level widgets + qDebug("Deleting remaining top level widgets"); + foreach (QWidget *win, QApplication::topLevelWidgets()) { + if(win && win != this) + delete win; + } // May freeze for a few seconds after the next line // because the Bittorrent session proxy will // actually be deleted now and destruction