[Purpose] Make it compile without foreach
Summary:
compile without foreach
NO_CHANGELOG
Test Plan: autotest ok
Reviewers: dfaure
Reviewed By: dfaure
Subscribers: kde-frameworks-devel
Tags: Frameworks
Differential Revision: https://phabricator.kde.org/D20647