Opened 15 years ago
Closed 15 years ago
Last modified 14 years ago
#6662 closed patch (fixed)
ComboBoxSetting breaks with "labels" and read/write configuration
Reported by: | Owned by: | Isaac Richards | |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | MythTV - General | Version: | unknown |
Severity: | medium | Keywords: | ComboBoxSetting |
Cc: | Ticket locked: | no |
Description
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 options.
Attachments (2)
Change History (6)
Changed 15 years ago by
Attachment: | combosetting_labels_r20746.patch added |
---|
comment:2 Changed 15 years ago by
Replying to sphery <mtdean@thirdcontact.com>:
kind of a dup of #4853 , except #4853 changed (one identified) affected setting whereas this patch changes the widget design/requirements
Not really, this addresses problems when the ComboBoxSetting
's _rw
parameter is set to true
Changed 15 years ago by
Attachment: | combosetting_labels_r23492.patch added |
---|
comment:3 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [23803]) Fixes #6662. Fixes editable comboboxes.
Since [17978], every time the user changed the text in the combobox (for each keystroke entered), a new entry was added to the combobox list of values. This change ensures that there's only one entry in the box corresponding to the user-edited content. Thanks to mythtv at dadeos for the patch.
Unfortunately, this changes a low-level header, so a lot of recompilation will be required, though a reconfigure shouldn't be necessary.
kind of a dup of #4853 , except #4853 changed (one identified) affected setting whereas this patch changes the widget design/requirements