[mythtv-commits] Ticket #6662: ComboBoxSetting breaks with "labels" and read/write configuration

MythTV mythtv at cvs.mythtv.org
Fri Jun 26 22:36:58 UTC 2009

#6662: ComboBoxSetting breaks with "labels" and read/write configuration
 Reporter:  mythtv at dadeos.co.uk  |       Owner:  ijr    
     Type:  patch                |      Status:  new    
 Priority:  minor                |   Milestone:  unknown
Component:  MythTV - General     |     Version:  unknown
 Severity:  medium               |     Mlocked:  0      
 The ComboBoxSetting class derives from SelectSetting class. The
 SelectSetting class contains "labels" and "values". This system allows for
 the "labels" to be shown in the user interface and the "values" to be used
 in the code. Whilst many settings use the same data for both "value" and
 "label" it is sometimes useful for them to be different.

 The ComboBoxSetting class displays a list of possible choices. It can also
 be flagged to allow for the entry of a free form string. In this mode the
 QComboBox::editTextChanged()] signal is connected to the
 `SelectSetting::setValue()`. However, the strings contained within the
 'QComboBox' may the "labels" and not the "values", resulting in
 `SelectSetting::setValue()` being called with incorrect data.

 The side effect of this is that erroneous ("value", "value") entries are
 inserted into the list of options for every ("label", "value") entry
 originally present. The behaviour is further complicated by the fact that
 QComboBox::editTextChanged()] is emitted whenever the text in the
 `QComboBox` changes, this includes merely switching between pre-defined

Ticket URL: <http://svn.mythtv.org/trac/ticket/6662>
MythTV <http://www.mythtv.org/>

More information about the mythtv-commits mailing list