[Kde-hardware-devel] Review Request 110026: Stop searching for timeout once identifier found

Oliver Henshaw oliver.henshaw at gmail.com
Mon Apr 15 15:19:33 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110026/
-----------------------------------------------------------

Review request for Solid.


Description
-------

Stop searching for timeout once identifier found

The identifier is unique.

Use QList::contains() rather than a nested for loop; break from the
QHash loop once the search succeeds.

Continuing to loop over the action timeouts should be safe but the
brightness action may use KAuth which may return to the event loop; this
allows another event to e.g. call loadProfile() which reloads all
actions and kick over the timeouts.

CCBUG: 315379


Diffs
-----

  powerdevil/daemon/powerdevilcore.cpp 2dcdbc62236d5c1fae384fdb9111825a2ebf5204 

Diff: http://git.reviewboard.kde.org/r/110026/diff/


Testing
-------

Checked the correct actions still fire on the correct timeouts. Checked actions that register several timeouts and actions that register just one.


Thanks,

Oliver Henshaw

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20130415/623df071/attachment.html>


More information about the Kde-hardware-devel mailing list