[Differential] [Commented On] D1770: [OSD] Allow disabling OSD through config file

graesslin (Martin Gräßlin) noreply at phabricator.kde.org
Mon Jun 6 05:41:20 UTC 2016


graesslin added a comment.


  can you explain why it should be configurable?

INLINE COMMENTS

> osd.cpp:36
>      , m_osdPath(corona->lookAndFeelPackage().filePath("osdmainscript"))
> +    , m_osdConfig(KConfigGroup(KSharedConfig::openConfig(QStringLiteral("plasmarc")), QStringLiteral("OSD")))
>  {

sharing a lesson learned from KWin: if you dependency inject the KSharedConfig you get two advantages:

1. No stringly-typed names like plasmarc
2. the class is easier to test as in a unit test you can inject a dummy KSharedConfig exactly with the key/values as one needs.

REPOSITORY
  rPLASMAWORKSPACE Plasma Workspace

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

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: broulik, #plasma
Cc: graesslin, plasma-devel, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160606/4ff6391a/attachment.html>


More information about the Plasma-devel mailing list