[vlc-devel] commit: Fixed dialog provider leaks on quit. (Laurent Aimar )

git version control git at videolan.org
Mon Jan 5 23:19:26 CET 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon Jan  5 23:09:51 2009 +0100| [6f323e7aef98146de6beca3dc0c093ba89ca9b36] | committer: Laurent Aimar 

Fixed dialog provider leaks on quit.

Thanks j-b for the infos.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6f323e7aef98146de6beca3dc0c093ba89ca9b36
---

 modules/gui/qt4/main_interface.cpp |    3 ---
 modules/gui/qt4/qt4.cpp            |    4 +++-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 7fcf069..dc55bc5 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -1074,9 +1074,6 @@ void MainInterface::closeEvent( QCloseEvent *e )
 {
     hide();
     THEDP->quit();
-
-    QApplication::closeAllWindows();
-    QApplication::quit();
 }
 
 void MainInterface::toggleFullScreen( void )
diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index 44b2ed8..822e504 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -301,7 +301,7 @@ static void Close( vlc_object_t *p_this )
     intf_sys_t *p_sys = p_intf->p_sys;
 
     var_Destroy (p_this->p_libvlc, "qt4-iface");
-    QApplication::postEvent (p_sys->p_mi, new QCloseEvent());
+    QApplication::quit();
 
     vlc_join (p_sys->thread, NULL);
     pl_Release (p_this);
@@ -429,6 +429,8 @@ static void *Thread( void *obj )
     /* And quit */
     msg_Dbg( p_intf, "Quitting the Qt4 Interface" );
 
+    QApplication::closeAllWindows();
+
     if (p_mi != NULL)
     {
         QMutexLocker locker (&iface.lock);




More information about the vlc-devel mailing list