D25881: [KCM/Desktop] Port from KQuickAddons::ConfigModule to ManagedConfigModule

Cyril Rossi noreply at phabricator.kde.org
Mon Dec 16 08:51:50 GMT 2019


crossi added a comment.


  Much better with isDefaults and isSaveNeeded override.

INLINE COMMENTS

> virtualdesktops.cpp:180
>  
> -    if (m_navWraps != m_settings->rollOverDesktop()) {
> -        needsSave = true;
> -    }
> -
> -    if (m_osdEnabled != m_settings->desktopChangeOsdEnabled()) {
> -        needsSave = true;
> -    }
> -
> -    if (m_osdDuration != m_settings->popupHideDelay()) {
> -        needsSave = true;
> -    }
> -
> -    if (m_osdTextOnly != m_settings->textOnly()) {
> -        needsSave = true;
> -    }
> -
> -    setNeedsSave(needsSave);
> +    return needsSave;
>  }

Could provide more simpler and nicer implementation like `isDefaults()` above, something like :

  return m_desktopsModel->needsSave() || m_animationsModel->needsSave();

REPOSITORY
  R108 KWin

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

To: meven, #kwin, ervin, crossi
Cc: crossi, kwin, LeGast00n, The-Feren-OS-Dev, sbergeron, jraleigh, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20191216/668dac8c/attachment-0001.html>


More information about the kwin mailing list