[Kde-hardware-devel] Review Request: Don't prematurely unload suspendsession action
Dario Freddi
drf at kde.org
Wed Oct 3 19:03:14 UTC 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/106692/#review19845
-----------------------------------------------------------
Ship it!
Very, very good catch. Thanks a lot for this patch
- Dario Freddi
On Oct. 2, 2012, 6:11 p.m., Oliver Henshaw wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/106692/
> -----------------------------------------------------------
>
> (Updated Oct. 2, 2012, 6:11 p.m.)
>
>
> Review request for Solid.
>
>
> Description
> -------
>
> Don't prematurely unload suspendsession action
>
> Sometimes ActionPool::loadAction is called with an empty (invalid) KConfigGroup
> in order to retrieve an Action* to trigger. These callers treat loadAction as a
> glorified getter, and should not disturb a loaded action. However, an "active"
> action was unloaded unconditionally and not subsequently reloaded, since
> actions can only be loaded with valid configurations.
>
> This meant that the idle timeout for the "SuspendSession" action was
> unregistered when session suspend was triggered by PowerDevil::Core or by a
> button event.
>
> - Only unload action if it's going to be loaded (i.e. group isValid)
> - Make m_activeActions track loaded actions, for consistency.
>
> Note: only the ActionPool::loadAction("SuspendSession") callers suffer
> undesirable behaviour from triggering this bug. The"DPMSControl" caller from
> HandleButtonEvents::processAction would disable DPMS if another bug did not mask
> this one.
>
> BUG: 306950
>
>
> Diffs
> -----
>
> powerdevil/daemon/powerdevilactionpool.cpp 484c27111be610822a368b6d4d7bdb912eb584b6
>
> Diff: http://git.reviewboard.kde.org/r/106692/diff/
>
>
> Testing
> -------
>
> Tested interaction of powerbutton action and timed power action for DPMS and lock screen on 4.8.x desktop and 4.9 VM (and for suspend session on desktop).
>
>
> Thanks,
>
> Oliver Henshaw
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20121003/37539c0a/attachment.html>
More information about the Kde-hardware-devel
mailing list