Skip to content

Avoid spurious checkcombobox toggle where indexes don't match

When clicking on a KCheckComboBox that has an item already selected, QComboBox will fire activated (via _q_editingFinished). When this popup is opening for the first time the currentIndex of the combo box is correct but the view's current index is still row 0. This leads to spuriously toggling the first item in the list.

Since this activation from QComboBox happens programatically, care must also be taken not to process this event for a disabled item.

I found another example of this apart from the weekly recurrence.

  1. In KOrganizer go to Settings > Configure KOrganizer > Time and Date
  2. In "Holidays" dropdown, select something that's not the top item, e.g. "Argentina (Spanish)"
  3. "OK" to save settings
  4. Quit KOrganizer
  5. Restart KOrganizer and return to the same settings
  6. Click on the Holidays dropdown and see that the top item "Algeria (Arabic)" has suddenly become selected in addition to the earlier selection.

BUG: 347045

Edited by Thomas Karpiniec

Merge request reports