Port away from Qt's foreach all loops over method-local containers
Summary:
The simple part of foreach porting, as those containers objects are not
shared with anyone, so the removal of the container copying has no risks
Reviewers: Kate, cullmann
Reviewed By: Kate, cullmann
Subscribers: cullmann, kwrite-devel, kde-frameworks-devel
Tags: Kate, Frameworks
Differential Revision: https://phabricator.kde.org/D23661