changeset 573:0b094b0fdcc4

Clean up more tidily on exit
author Chris Cannam
date Thu, 16 May 2013 14:05:21 +0100
parents 94924cab11c8
children 7941d4f15037
files .hgsubstate main/MainWindow.cpp main/MainWindow.h main/main.cpp
diffstat 4 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/.hgsubstate	Wed May 15 22:15:58 2013 +0100
+++ b/.hgsubstate	Thu May 16 14:05:21 2013 +0100
@@ -1,4 +1,4 @@
 7096c7de2d4c327de5e028c33036f146a1884706 dataquay
-489bb1ba12025ace5dc0da53072d24019d158f8d svapp
-0ef8a4bc48b9aa826a490b3cf0b879b8744ad529 svcore
-2c35737cd3f84d3b9a5363d12fa1480ff7b5009a svgui
+8cb01cd2441d1009fce5c1234ecbe033ce45484a svapp
+b18f8c5fb4f5c74700257b6d2c94bd247c1582f2 svcore
+77fa3fdbfc7e2b9f96eac6524d48294fb47760c3 svgui
--- a/main/MainWindow.cpp	Wed May 15 22:15:58 2013 +0100
+++ b/main/MainWindow.cpp	Thu May 16 14:05:21 2013 +0100
@@ -306,9 +306,9 @@
     
     TransformFactory::getInstance()->startPopulationThread();
 
-    VersionTester *vt = new VersionTester
+    m_versionTester = new VersionTester
         ("sonicvisualiser.org", "/latest-version.txt", SV_VERSION);
-    connect(vt, SIGNAL(newerVersionAvailable(QString)),
+    connect(m_versionTester, SIGNAL(newerVersionAvailable(QString)),
             this, SLOT(newerVersionAvailable(QString)));
 }
 
@@ -319,6 +319,7 @@
     delete m_activityLog;
     delete m_preferencesDialog;
     delete m_layerTreeDialog;
+    delete m_versionTester;
     Profiles::getInstance()->dump();
 //    SVDEBUG << "MainWindow::~MainWindow finishing" << endl;
 }
--- a/main/MainWindow.h	Wed May 15 22:15:58 2013 +0100
+++ b/main/MainWindow.h	Thu May 16 14:05:21 2013 +0100
@@ -60,6 +60,7 @@
 class ActivityLog;
 class QFileSystemWatcher;
 class QScrollArea;
+class VersionTester;
 
 class MainWindow : public MainWindowBase
 {
@@ -245,6 +246,8 @@
 
     QFileSystemWatcher      *m_templateWatcher;
 
+    VersionTester           *m_versionTester;
+
     struct LayerConfiguration {
 	LayerConfiguration(LayerFactory::LayerType _layer
 			                       = LayerFactory::TimeRuler,
--- a/main/main.cpp	Wed May 15 22:15:58 2013 +0100
+++ b/main/main.cpp	Thu May 16 14:05:21 2013 +0100
@@ -445,6 +445,8 @@
 
     delete gui;
 
+    cleanupMutex.unlock();
+
     return rv;
 }