D26040: [KCM/Effects] Allow the user to know when the settings are set to default

Vlad Zahorodnii <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
zzag added a comment.


  Other than issues pointed out in inline comments, this patch looks good to me.

INLINE COMMENTS

> effectsmodel.cpp:571
> +            return false;
> +        } else if ((bool)effect.status != effect.enabledByDefault) {
> +            return false;

No `else` after a return statement.

> effectsmodel.cpp:662
>          module, &KCModule::defaults);
> +    connect(module, &KCModule::defaulted, this, [=] (bool defaulted) {
> +        buttons->button(QDialogButtonBox::RestoreDefaults)->setEnabled(!defaulted);

God I wish we had good support for clang-format. Could you please remove whitespace between `[=]` and `(bool defaulted)`? Sorry for annoying you with whitespace issues. :/

> kcm.cpp:55
>      connect(m_model, &EffectsModel::dataChanged, this, &DesktopEffectsKCM::updateNeedsSave);
> +    connect(m_model, &EffectsModel::loaded, this, &DesktopEffectsKCM::updateNeedsSave);
>  }

Do we actually need this connect? I assume that signal dataChanged is emitted when the model is loaded.

REPOSITORY
  R108 KWin

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

To: meven, #kwin, crossi, ervin
Cc: zzag, kwin, LeGast00n, The-Feren-OS-Dev, sbergeron, jraleigh, zachus, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.