kossebau added a comment.
There are quite a lot of foreachs in ktexteditor, so IMHO it makes sense to split up the porting in multiple commits, so in case of regressions one can bisect in the overall changes a bit and then has fewer changes to reason about where something might have been broken. So my plan for further commits is: - one commit where method-local copies would be made explicit ,where currently they are done implicitly in the foreach() by some call -> minimal risk, as not shared - commits where new structures are generated by iterating shared containers, without method calls which might modify the containers potentially - commits per classes/submodules where each change needs careful review, as recursive non-const calls happen REPOSITORY R39 KTextEditor REVISION DETAIL https://phabricator.kde.org/D23661 To: kossebau, #kate Cc: kwrite-devel, kde-frameworks-devel, LeGast00n, GB_2, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann