> The use of a reverse for loop does not seem necessary. A forward one would be
> simpler. And even better would be to use a Q_FOREACH.
It *is* necessary because in this loop we are potentially removing the current action from the list, thus invalidating greater indexes. Iterating backward ensures the current index is always valid without having to resort to complex arithmetics.
> The use of a reverse for loop does not seem necessary. A forward one would be
> simpler. And even better would be to use a Q_FOREACH.
It *is* necessary because in this loop we are potentially removing the current action from the list, thus invalidating greater indexes. Iterating backward ensures the current index is always valid without having to resort to complex arithmetics.