Review Request 127946: [KDeclarative] [KCMShell] Add "authorized" wrapper around KAuthorize::authorizeControlModules

Kai Uwe Broulik kde at privat.broulik.de
Tue May 17 18:31:00 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127946/
-----------------------------------------------------------

Review request for Plasma.


Repository: kdeclarative


Description
-------

This allows to hide a configure button if the resulting click would do nothing due to KIOSK restrictions.


Diffs
-----

  src/qmlcontrols/kquickcontrolsaddons/CMakeLists.txt be2d534 
  src/qmlcontrols/kquickcontrolsaddons/kcmshell.h 7436aba 
  src/qmlcontrols/kquickcontrolsaddons/kcmshell.cpp af2e639 

Diff: https://git.reviewboard.kde.org/r/127946/diff/


Testing
-------

If I disable all kcms for powermanagement I now longer get a "Configure Power saving", obviously the applets need to be adjusted but we should do that for the default setup.

Not sure about the API, though, makes it a bit cumbersome to use. Perhaps we need a shortcut like KAuthorized has where you just do if (authorize("foo")) and done? Would also save costly conversions between C++ and QML types. I'm open to suggestions :)

Supposedly you can just do foo("bar") instead of foo(["bar"]) for QStringList args and it will implicitly convert it for you but I don't trust that

Also all the "Kconfig found" cmake checks all over the place are rather superfluous as it's a required dep for kdeclarative


Thanks,

Kai Uwe Broulik

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160517/a9196437/attachment.html>


More information about the Plasma-devel mailing list