Stop searching for timeout once identifier found

Review Request #110026 - Created April 15, 2013 and submitted

Oliver Henshaw
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
Checked the correct actions still fire on the correct timeouts. Checked actions that register several timeouts and actions that register just one.
Dario Freddi
Commit Hook
Oliver Henshaw
Review request changed

Status: Closed (submitted)