[vlc-devel] [PATCH 08/11] qt: refactor ChangeAFiltersString

Thomas Guillem thomas at gllm.fr
Mon May 29 18:53:02 CEST 2017


Ref #6873
---
 modules/gui/qt/components/extended_panels.cpp | 24 ++++++++++--------------
 1 file changed, 10 insertions(+), 14 deletions(-)

diff --git a/modules/gui/qt/components/extended_panels.cpp b/modules/gui/qt/components/extended_panels.cpp
index 2e2b8815c4..20eed19ba0 100644
--- a/modules/gui/qt/components/extended_panels.cpp
+++ b/modules/gui/qt/components/extended_panels.cpp
@@ -290,19 +290,6 @@ static QString ChangeFiltersString( struct intf_thread_t *p_intf, const char *ps
     return list.join( ":" );
 }
 
-static void ChangeAFiltersString( struct intf_thread_t *p_intf, const char *psz_name, bool b_add )
-{
-    module_t *p_obj = module_find( psz_name );
-    if( !p_obj )
-    {
-        msg_Err( p_intf, "Unable to find filter module \"%s\".", psz_name );
-        return;
-    }
-
-    QString result = ChangeFiltersString( p_intf, "audio-filter", psz_name, b_add );
-    config_PutPsz( p_intf, "audio-filter", qtu( result ) );
-}
-
 static void ChangeVFiltersString( struct intf_thread_t *p_intf, const char *psz_name, bool b_add )
 {
     const char *psz_filter_type = GetVFilterType( p_intf, psz_name );
@@ -958,7 +945,16 @@ void AudioFilterControlWidget::build()
 
 void AudioFilterControlWidget::enable( bool b_enable ) const
 {
-    ChangeAFiltersString( p_intf, qtu(name), b_enable );
+    module_t *p_obj = module_find( qtu(name) );
+    if( !p_obj )
+    {
+        msg_Err( p_intf, "Unable to find filter module \"%s\".", qtu(name) );
+        return;
+    }
+
+    QString result = ChangeFiltersString( p_intf, "audio-filter", qtu(name),
+                                          b_enable );
+    config_PutPsz( p_intf, "audio-filter", qtu( result ) );
     playlist_EnableAudioFilter( THEPL, qtu(name), b_enable );
 }
 
-- 
2.11.0



More information about the vlc-devel mailing list