From 90879386d5464e8f3b9a984f930f405bf7664ec2 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Wed, 24 Dec 2008 14:53:40 +0000 Subject: [PATCH] - Fixed Qt4 warning when deleting options --- Changelog | 1 + src/GUI.cpp | 6 ++++-- src/GUI.h | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Changelog b/Changelog index c3ff24255..304e3a989 100644 --- a/Changelog +++ b/Changelog @@ -14,6 +14,7 @@ - BUGFIX: Fixed several memory leaks - BUGFIX: WebUI is now working with IE7 - BUGFIX: Fixed spacing problem in toolbar when toggling its visibility + - BUGFIX: Fixed some compilation and Qt4 warnings * Unknown - Christophe Dumez - v1.2.1 - BUGFIX: Fixed possible crash when deleting a torrent permanently diff --git a/src/GUI.cpp b/src/GUI.cpp index 2e0bc5eab..a08beec67 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -1119,8 +1119,10 @@ void GUI::configureSession(bool deleteOptions) { displayRSSTab(false); } // Clean up - if(deleteOptions) { - delete options; + if(deleteOptions && options) { + qDebug("Deleting options"); + //delete options; + options->deleteLater(); } qDebug("Session configured"); } diff --git a/src/GUI.h b/src/GUI.h index 90f648e17..7c3c08209 100644 --- a/src/GUI.h +++ b/src/GUI.h @@ -64,7 +64,7 @@ class GUI : public QMainWindow, private Ui::MainWindow{ QList > unauthenticated_trackers; // GUI related QTabWidget *tabs; - options_imp *options; + QPointer options; QSystemTrayIcon *myTrayIcon; QPointer systrayCreator; QMenu *myTrayIconMenu;