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

Vlad Zahorodnii noreply at phabricator.kde.org
Tue Dec 17 18:56:05 GMT 2019


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20191217/b026fc0b/attachment-0001.html>


More information about the kwin mailing list