[vlc-commits] Qt: do not delete parented QDialogs

Jean-Baptiste Kempf git at videolan.org
Mon Sep 10 17:12:59 CEST 2012


vlc/vlc-2.0 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Sep 10 16:58:33 2012 +0200| [6044d094ec6e73d0364718dbea47ca3378c8ea7e] | committer: Jean-Baptiste Kempf

Qt: do not delete parented QDialogs

Ref #7431 #5377
(cherry picked from commit a2df1797f9b6b39fcb8eeb3f0d616e9713b065c5)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=6044d094ec6e73d0364718dbea47ca3378c8ea7e
---

 modules/gui/qt4/components/simple_preferences.cpp |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt4/components/simple_preferences.cpp b/modules/gui/qt4/components/simple_preferences.cpp
index 1840a05..2af9138 100644
--- a/modules/gui/qt4/components/simple_preferences.cpp
+++ b/modules/gui/qt4/components/simple_preferences.cpp
@@ -1018,7 +1018,6 @@ void SPrefsPanel::assoDialog()
     CONNECT( clearButton, clicked(), d, reject() );
     d->resize( 300, 400 );
     d->exec();
-    delete d;
     delete qvReg;
     listAsso.clear();
 }
@@ -1033,7 +1032,7 @@ void addAsso( QVLCRegistry *qvReg, const char *psz_ext )
 
     if( !EMPTY_STR(psz_value) )
         qvReg->WriteRegistryString( psz_ext, "VLC.backup", psz_value );
-    delete psz_value;
+    free( psz_value );
 
     /* Put a "link" to VLC.EXT as default */
     qvReg->WriteRegistryString( psz_ext, "", qtu( s_path ) );
@@ -1075,7 +1074,7 @@ void delAsso( QVLCRegistry *qvReg, const char *psz_ext )
 
         qvReg->DeleteKey( psz_ext, "VLC.backup" );
     }
-    delete( psz_value );
+    free( psz_value );
 }
 void SPrefsPanel::saveAsso()
 {



More information about the vlc-commits mailing list