Commit 417738d2 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Qt4: fix hack to detect combo config items

Zero items count means there is no static list. But there could be a
dynamic list. Qt should not access config items directly.
parent 8629a3fe
...@@ -93,7 +93,7 @@ ConfigControl *ConfigControl::createControl( vlc_object_t *p_this, ...@@ -93,7 +93,7 @@ ConfigControl *ConfigControl::createControl( vlc_object_t *p_this,
p_control = new ModuleListConfigControl( p_this, p_item, parent, true ); p_control = new ModuleListConfigControl( p_this, p_item, parent, true );
break; break;
case CONFIG_ITEM_STRING: case CONFIG_ITEM_STRING:
if( p_item->list_count ) if( p_item->list.psz_cb )
p_control = new StringListConfigControl( p_this, p_item, parent ); p_control = new StringListConfigControl( p_this, p_item, parent );
else else
p_control = new StringConfigControl( p_this, p_item, parent, false ); p_control = new StringConfigControl( p_this, p_item, parent, false );
...@@ -105,7 +105,7 @@ ConfigControl *ConfigControl::createControl( vlc_object_t *p_this, ...@@ -105,7 +105,7 @@ ConfigControl *ConfigControl::createControl( vlc_object_t *p_this,
p_control = new ColorConfigControl( p_this, p_item, parent ); p_control = new ColorConfigControl( p_this, p_item, parent );
break; break;
case CONFIG_ITEM_INTEGER: case CONFIG_ITEM_INTEGER:
if( p_item->list_count ) if( p_item->list.i_cb )
p_control = new IntegerListConfigControl( p_this, p_item, parent, false ); p_control = new IntegerListConfigControl( p_this, p_item, parent, false );
else if( p_item->min.i || p_item->max.i ) else if( p_item->min.i || p_item->max.i )
p_control = new IntegerRangeConfigControl( p_this, p_item, parent ); p_control = new IntegerRangeConfigControl( p_this, p_item, parent );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment