Replace foreach with ranged for loop


Store the list of graphs in a const list and use ranged for.

Remove Q_FOREACH-whitelisting of source file.

Amends a84bf68892e93450e8c4ab1a6b90ae843dc6af35.

Pick-to: 6.6
Change-Id: I95b624e15ee7dd242c02812520615c3f778b21dc
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
commita127aece4021a2c760d496d63849c63187b0219c
parenta84bf68892e93450e8c4ab1a6b90ae843dc6af35
authorVolker Hilsheimer <volker.hilsheimer@qt.io>
committerVolker Hilsheimer <volker.hilsheimer@qt.io>
commit timeTue, 22 Aug 2023 11:57:44 +0200