Review Request 122132: Expose inhibitions in power management dataengine
Emmanuel Pescosta
emmanuelpescosta099 at gmail.com
Tue Jan 20 08:43:51 UTC 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122132/#review74375
-----------------------------------------------------------
Looks pretty good, thanks for this great feature! :)
dataengines/powermanagement/powermanagementengine.cpp
<https://git.reviewboard.kde.org/r/122132/#comment51602>
missing space (and foreach maybe?)
dataengines/powermanagement/powermanagementengine.cpp
<https://git.reviewboard.kde.org/r/122132/#comment51603>
missing space (and foreach maybe?)
dataengines/powermanagement/powermanagementengine.cpp
<https://git.reviewboard.kde.org/r/122132/#comment51601>
Personally I would do this in PowermanagementEngine::populateApplicationData as fallback when no service was found, makes it more re-usable because the caller can be sure that prettyName and icon are valid in all cases. (setting default values before calling a method which overwrites the values only in some cases isn't the best way I think, because modifications in this method can lead to unwanted changes on the caller side - I have seen a lot of such problems in my summer job)
if (service) {
...
} else {
*prettyName = name;
*icon = QString();
}
- Emmanuel Pescosta
On Jan. 19, 2015, 8:02 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. 19, 2015, 8:02 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.h a06fe7a
> dataengines/powermanagement/powermanagementengine.cpp 2d370e6
>
> 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
> Updated wording
> https://git.reviewboard.kde.org/media/uploaded/files/2015/01/18/92d2371b-ead1-418f-8670-4fdb82fc4223__pmdisabled4.png
>
>
> Thanks,
>
> Kai Uwe Broulik
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20150120/f0a4e070/attachment.html>
More information about the Plasma-devel
mailing list