Skip to content

Fix several bugs related to illegal range for iteration statements

Jiří Paleček requested to merge jpalecek/akonadi:bugfix-1 into master

Hello,

this merge request fixes several places in the code where the constraint that in a range for statement, eg.

for(auto x : qlist)

the qlist is not modified during the iteration. This leads to (at worst) dangling iterators and crashes, sometimes also to missed elements in the iteration.

A test checking one of those locations is included. The others are unfortunately hard to test, so I omitted that.

Merging this should fix these bugs:

BUG: 468343 BUG: 465245 BUG: 464275 BUG: 462213 BUG: 462169 BUG: 461131 BUG: 460653 BUG: 460586 BUG: 458497 BUG: 458315

IMHO they should all be duplicates (but aren't).

Edited by Jiří Paleček

Merge request reports