Avoid using 'for..in' to iterate over collections


'for..in' construct iterates through enumerable properties meaning that
user added properties to default type's prototype (like Array.prototype.first)
are also included. Proper usage involves 'hasOwnProperty' but is not as
clean and generally discouraged by popular style guides in favor of
'for..of' and 'Object.keys' and higher-order functions like 'forEach'.
Adopt them for iteration to fix unexpected property warnings.

Fixes: QTBUG-50999
Change-Id: Ia0846b0c5a2c34f5ee6f1dcb82198cb3946a95f1
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
commitb2685b64d1f2fef2ef1f3f3542379fb8f052d113
parentb19e610e7de40815fd15e5398ad69ec69d05c41b
authorKirill Burtsev <kirill.burtsev@qt.io>
committerKirill Burtsev <kirill.burtsev@qt.io>
commit timeFri, 22 Nov 2019 11:41:26 +0100