Avoid useless temporary collections (-Wclazy-container-anti-pattern)
Reviewers: bensi, franckarrecot, dfaure, mlaurent
Differential Revision: https://phabricator.kde.org/D967