[Kde-hardware-devel] Review Request: Handle unsupported actions quietly
Oliver Henshaw
oliver.henshaw at gmail.com
Thu Nov 8 23:42:41 UTC 2012
> On Nov. 8, 2012, 10:28 p.m., Kai Uwe Broulik wrote:
> > powerdevil/daemon/powerdevilcore.cpp, line 376
> > <http://git.reviewboard.kde.org/r/107257/diff/1/?file=94421#file94421line376>
> >
> > So, if the action exists, you load it. And if it doesn't then you check if it is unsupported to not load it?
> > Shouldn't be the other way round? :)
Hmm, good point. I would rather say that if it doesn't load I ask why and decide whether to warn quietly or loudly. That is, I'm acting as if I have an error code - perhaps I should be honest about that and add one?
- Oliver
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107257/#review21658
-----------------------------------------------------------
On Nov. 8, 2012, 9:24 p.m., Oliver Henshaw wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107257/
> -----------------------------------------------------------
>
> (Updated Nov. 8, 2012, 9:24 p.m.)
>
>
> Review request for Solid.
>
>
> Description
> -------
>
> Handle unsupported actions quietly
>
> Attempting to load a configured action on a machine where it is not
> supported (e.g. DPMS when the display doesn't support it or it is not
> compiled in) fails and brings up a notification, something that is
> particularly intrusive during login.
>
> Workaround by tracking which actions failed to initialise because they
> were unsupported. Interested ActionPool::loadAction callers can then
> ask whether failed action loads are due to unsupported actions.
>
> PowerDevil:;Core::loadProfile uses this check to decide whether to warn
> to stderr rather than notifying the user of a misconfiguration. Other
> loadAction callers are unaffected.
>
> NB: A complete fix might involve detecting whether the action is
> supportable when loading the action configuration and/or in the profile
> generator. However that may not turn out to be a feasible approach.
>
> BUG: 302846
>
>
> Diffs
> -----
>
> powerdevil/daemon/powerdevilactionpool.h 8a94eacc8ef2c2aead8cb075cbc80b783c1aeb4c
> powerdevil/daemon/powerdevilactionpool.cpp a9950f174fe184b8faa54c54fc00654984c65b3f
> powerdevil/daemon/powerdevilcore.cpp 2dcdbc62236d5c1fae384fdb9111825a2ebf5204
>
> Diff: http://git.reviewboard.kde.org/r/107257/diff/
>
>
> Testing
> -------
>
> Tested in VM with cirrus/vnc (dpms) and qxl/spice (non-dpms) graphics.
>
>
> Thanks,
>
> Oliver Henshaw
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20121108/fea2dc7c/attachment.html>
More information about the Kde-hardware-devel
mailing list