[Kde-hardware-devel] Review Request: Don't prematurely unload suspendsession action
Oliver Henshaw
oliver.henshaw at gmail.com
Tue Oct 2 18:11:12 UTC 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/106692/
-----------------------------------------------------------
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/20121002/e021099b/attachment.html>
More information about the Kde-hardware-devel
mailing list