Replace foreach with range-for
Summary: I missed one file before, now it should actually build with -DQT_NO_FOREACH.
Test Plan: make && ctest
Reviewers: Frameworks, jgrulich
Reviewed By: jgrulich
Subscribers: kde-frameworks-devel
Tags: Frameworks
Differential Revision: https://phabricator.kde.org/D29121