ervin requested changes to this revision.
ervin added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> EffectSettingsPopup.qml:72
> +                onMainToolBarStyleChanged: {
> +                    mainToolBarStyleCombo.currentIndex = 
> mainToolBarStyleCombo.model.findIndex(function (item) {
> +                        return item.value === kcm.mainToolBarStyle

To de-duplicate a bit, because now that's 4 times (almost) the same piece of 
code. What about having a function resetIndex() declared in that combo and 
another one in the other combobox which would do the currentIndex + findIndex 
dance.

This way in both the code would become in both cases:

  currentIndex: resetIndex()
  ...
      onFooStyleChanged: fooStyleCombo.resetIndex()

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D24916

To: crossi, #plasma, ervin, mart, bport
Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, 
ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart

Reply via email to