]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/extended_panels.cpp
Fix memleak in Qt interface.
[vlc] / modules / gui / qt4 / components / extended_panels.cpp
index ca7d471a5e5615b2404d4f9a8f18b3ed2524c544..2085f6d82ec5654335554bc8ea9839e12d4c14ce 100644 (file)
@@ -990,6 +990,7 @@ void Equalizer::updateUISliderValues( int i_preset )
     if( i_preset < 0 ) return;
 
     char *p = createValuesFromPreset( i_preset );
+    char *psz = p;
     float f_preamp = eqz_preset_10b[i_preset]->f_preamp;
 
     if ( p )
@@ -1008,6 +1009,7 @@ void Equalizer::updateUISliderValues( int i_preset )
             if( *p == '\0' )
                 break;
         }
+        free( psz );
     }
     ui.preampSlider->setValue( (int)( ( f_preamp + 20 ) * 10 ) );
     ui.preampLabel->setText( qtr( "Preamp\n" )
@@ -1332,8 +1334,6 @@ SyncControls::SyncControls( intf_thread_t *_p_intf, QWidget *_parent ) :
 
     updateButton = new QToolButton;
     updateButton->setAutoRaise( true );
-    updateButton->setText( "u" );
-    updateButton->setToolTip( qtr( "Force update of this dialog's values" ) );
     mainLayout->addWidget( updateButton, 0, 4, 1, 1 );
 
 
@@ -1348,7 +1348,8 @@ SyncControls::SyncControls( intf_thread_t *_p_intf, QWidget *_parent ) :
     CONNECT( subsSpin, valueChanged ( double ), this, advanceSubs( double ) ) ;
     CONNECT( subSpeedSpin, valueChanged ( double ),
              this, adjustSubsSpeed( double ) );
-    BUTTONACT( updateButton, update() );
+    BUTTON_SET_ACT_I( updateButton, "", update,
+            qtr( "Force update of this dialog's values" ), update() );
 
     /* Set it */
     update();