Refactor: for loops


Replace indexed for loops with ranged for, replace int with qsizetype
otherwise as appropriate. Apply const and line breaks in surrounding
code.

Pick-to: 6.2
Change-Id: I1c2ee372545b8ab2cbb84c4b4b97ae52dedff1d0
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
commit366a6379fb80e8c223ae57b2fd791ffdfeacdbf3
parent517e4f284e1808ecddc998d73b4b554880733381
authorVolker Hilsheimer <volker.hilsheimer@qt.io>
committerVolker Hilsheimer <volker.hilsheimer@qt.io>
commit timeWed, 14 Sep 2022 20:05:49 +0200