Review Request 122132: Expose inhibitions in power management dataengine
David Edmundson
david at davidedmundson.co.uk
Sun Jan 18 18:51:30 UTC 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122132/#review74254
-----------------------------------------------------------
Cool feature.
dataengines/powermanagement/powermanagementengine.cpp
<https://git.reviewboard.kde.org/r/122132/#comment51555>
This is this new API in powerdevil?
If so I'd much rather we returned
a[ss] than abusing a stringlist; even if it is a tad more work.
You could also optimise to have inhibitionsChanged(added QList<QPair>, removed QStringList) which saves dbus to and fro, and would allow this to do less lookups.
Whether that's useful depends on how often this is likely to be called.
dataengines/powermanagement/powermanagementengine.cpp
<https://git.reviewboard.kde.org/r/122132/#comment51554>
in this branch your watcher leaks.
you can put the deleteLater(); at the top and then you won't then have a risk of this
- David Edmundson
On Jan. 18, 2015, 6:36 p.m., Kai Uwe Broulik wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122132/
> -----------------------------------------------------------
>
> (Updated Jan. 18, 2015, 6:36 p.m.)
>
>
> Review request for Plasma and KDE Usability.
>
>
> Repository: plasma-workspace
>
>
> Description
> -------
>
> This adds a new "Inhibition" source which has keys for each application (amarok, vlc, ...) and inside a QVariantMap with the pretty application name (taken from the desktop file through KService and cached locally), the application icon and the reason for the inhibition (as provided by the application)
>
>
> Diffs
> -----
>
> dataengines/powermanagement/powermanagementengine.cpp 2d370e6
> dataengines/powermanagement/powermanagementengine.h a06fe7a
>
> Diff: https://git.reviewboard.kde.org/r/122132/diff/
>
>
> Testing
> -------
>
> Works well, survives plasma reboots, and can now expose this information to the user in the battery monitor.
>
> Adding usability just for feedback on the eventual user representation, see screenshot. It shows the application icon plus either "Amarok has disabled power management: Playing music" or in case of multiple inhibitions "Amarok and n other applications have disabled power management".
>
>
> File Attachments
> ----------------
>
> In action
> https://git.reviewboard.kde.org/media/uploaded/files/2015/01/18/bd4c4b7c-89de-4ce6-9004-d480c2e1af57__pmdisabled3.png
>
>
> Thanks,
>
> Kai Uwe Broulik
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20150118/ce632bfe/attachment.html>
More information about the Plasma-devel
mailing list