]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/complete_preferences.cpp
Qt, logo filter should have a browse button for file selection.
[vlc] / modules / gui / qt4 / components / complete_preferences.cpp
index 2a5f6113811be7308e6a80dd38eda4d95d4a025d..49a217ba5ca1c6ba22cd867929393094b943d762 100644 (file)
@@ -42,6 +42,7 @@
 
 #include <vlc_config_cat.h>
 #include <vlc_intf_strings.h>
+#include <vlc_modules.h>
 #include <assert.h>
 
 #define ITEM_HEIGHT 25
@@ -440,7 +441,7 @@ AdvPrefsPanel::AdvPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
             ( p_item->i_type == CONFIG_CATEGORY ||
               p_item->i_type == CONFIG_SUBCATEGORY ) )
             break;
-        if( p_item->b_internal == true ) continue;
+        if( p_item->b_internal ) continue;
 
         if( p_item->i_type == CONFIG_SECTION )
         {
@@ -456,12 +457,12 @@ AdvPrefsPanel::AdvPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
             boxlayout = new QGridLayout();
         }
         /* Only one hotkey control */
-        if( has_hotkey && p_item->i_type & CONFIG_ITEM && p_item->psz_name &&
-                                         strstr( p_item->psz_name, "key-" ) )
-            continue;
-        if( p_item->i_type & CONFIG_ITEM && p_item->psz_name &&
-                                            strstr( p_item->psz_name, "key-" ) )
+        if( (p_item->i_type & CONFIG_ITEM) == CONFIG_ITEM_KEY )
+        {
+            if( has_hotkey )
+                continue;
             has_hotkey = true;
+        }
 
         ConfigControl *control;
         if( ! box )
@@ -502,12 +503,8 @@ AdvPrefsPanel::AdvPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
 
 void AdvPrefsPanel::apply()
 {
-    QList<ConfigControl *>::Iterator i;
-    for( i = controls.begin() ; i != controls.end() ; i++ )
-    {
-        ConfigControl *c = qobject_cast<ConfigControl *>(*i);
-        c->doApply( p_intf );
-    }
+    foreach ( ConfigControl *cfg, controls )
+        cfg->doApply();
 }
 
 void AdvPrefsPanel::clean()