[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[vidalia-svn] r2007: Make the main window the parent of all the other dialogs, li (in trunk: . src/gui)



Author: edmanm
Date: 2007-10-12 01:47:33 -0400 (Fri, 12 Oct 2007)
New Revision: 2007

Modified:
   trunk/
   trunk/src/gui/mainwindow.cpp
Log:
 r2078@lysithea:  edmanm | 2007-10-12 01:46:41 -0400
 Make the main window the parent of all the other dialogs, like the config
 dialog and the message log, so Qt can take care of cleaning everything up on
 exit. We were also previously leaking the memory allocated to the
 ConfigDialog on exit.



Property changes on: trunk
___________________________________________________________________
 svk:merge ticket from /local/vidalia/trunk [r2078] on dc66be73-d13e-47ba-a267-8dc7cda68c65

Modified: trunk/src/gui/mainwindow.cpp
===================================================================
--- trunk/src/gui/mainwindow.cpp	2007-10-12 03:42:41 UTC (rev 2006)
+++ trunk/src/gui/mainwindow.cpp	2007-10-12 05:47:33 UTC (rev 2007)
@@ -114,10 +114,10 @@
   ui.setupUi(this);
 
   /* Create all the dialogs of which we only want one instance */
-  _messageLog     = new MessageLog();
-  _bandwidthGraph = new BandwidthGraph();
-  _netViewer      = new NetViewer();
-  _configDialog   = new ConfigDialog();
+  _messageLog     = new MessageLog(this);
+  _bandwidthGraph = new BandwidthGraph(this);
+  _netViewer      = new NetViewer(this);
+  _configDialog   = new ConfigDialog(this);
 
   /* Create the actions that will go in the tray menu */
   createActions();
@@ -168,9 +168,6 @@
 MainWindow::~MainWindow()
 {
   _trayIcon.hide();
-  delete _messageLog;
-  delete _netViewer;
-  delete _bandwidthGraph;
 }
 
 /** Returns true if we're running on a platform with tray icon support. */