[vlc-devel] [PATCH 03/11] qt: remove forward declaration
Thomas Guillem
thomas at gllm.fr
Mon May 29 18:52:57 CEST 2017
---
modules/gui/qt/components/extended_panels.cpp | 50 ++++++++++++---------------
1 file changed, 23 insertions(+), 27 deletions(-)
diff --git a/modules/gui/qt/components/extended_panels.cpp b/modules/gui/qt/components/extended_panels.cpp
index df6ed3b14d..de070d3625 100644
--- a/modules/gui/qt/components/extended_panels.cpp
+++ b/modules/gui/qt/components/extended_panels.cpp
@@ -53,9 +53,29 @@
#include <vlc_modules.h>
#include <vlc_plugin.h>
-static QString ChangeFiltersString( struct intf_thread_t *p_intf, const char *psz_filter_type, const char *psz_name, bool b_add );
-static void ChangeAFiltersString( struct intf_thread_t *p_intf, const char *psz_name, bool b_add );
-static void ChangeVFiltersString( struct intf_thread_t *p_intf, const char *psz_name, bool b_add );
+static const char* GetVFilterType( struct intf_thread_t *p_intf, const char *psz_name )
+{
+ module_t *p_obj = module_find( psz_name );
+ if( !p_obj )
+ {
+ msg_Err( p_intf, "Unable to find filter module \"%s\".", psz_name );
+ return NULL;
+ }
+
+ if( module_provides( p_obj, "video splitter" ) )
+ return "video-splitter";
+ else if( module_provides( p_obj, "video filter" ) )
+ return "video-filter";
+ else if( module_provides( p_obj, "sub source" ) )
+ return "sub-source";
+ else if( module_provides( p_obj, "sub filter" ) )
+ return "sub-filter";
+ else
+ {
+ msg_Err( p_intf, "Unknown video filter type." );
+ return NULL;
+ }
+}
static const QString ModuleFromWidgetName( QObject *obj )
{
@@ -277,30 +297,6 @@ static void ChangeAFiltersString( struct intf_thread_t *p_intf, const char *psz_
config_PutPsz( p_intf, "audio-filter", qtu( result ) );
}
-static const char* GetVFilterType( struct intf_thread_t *p_intf, const char *psz_name )
-{
- module_t *p_obj = module_find( psz_name );
- if( !p_obj )
- {
- msg_Err( p_intf, "Unable to find filter module \"%s\".", psz_name );
- return NULL;
- }
-
- if( module_provides( p_obj, "video splitter" ) )
- return "video-splitter";
- else if( module_provides( p_obj, "video filter" ) )
- return "video-filter";
- else if( module_provides( p_obj, "sub source" ) )
- return "sub-source";
- else if( module_provides( p_obj, "sub filter" ) )
- return "sub-filter";
- else
- {
- msg_Err( p_intf, "Unknown video filter type." );
- return NULL;
- }
-}
-
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 );
--
2.11.0
More information about the vlc-devel
mailing list