[kfilemetadata] Make it compile without foreach
Summary: compile without foreach
Test Plan: autotest ok
Reviewers: dfaure, bruns, Baloo
Reviewed By: bruns, Baloo
Subscribers: bruns, kde-frameworks-devel, Baloo
Tags: Frameworks, Baloo
Differential Revision: https://phabricator.kde.org/D19655