Mark the module as free of Q_FOREACH, except where it isn't


The density of Q_FOREACH uses is high here, too high for this author,
unfamiliar with this module, to tackle in a short amount of time. But
they're concentrated in just a few TUs, so pick a different strategy:

Mark the whole module with QT_NO_FOREACH, to prevent new uses from
creeping in, and whitelist the affected TUs by #undef'ing
QT_NO_FOREACH locally, at the top of each file. For TUs that are part
of a larger executable, this requires these files to be compiled
separately, so add them to NO_PCH_SOURCES (which implies
NO_UNITY_BUILD_SOURCES, too). Created QTBUG-115807 to keep track of
this.

Ported one that was trivial and where whitelisting of the file with a
single Q_FOREACH would have been more work than directly fixing it.

Task-number: QTBUG-115807
Change-Id: I2fa6c740e35039baf34115af7d69d6c420e4de10
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
commita84bf68892e93450e8c4ab1a6b90ae843dc6af35
parent0c45ec75d82b480bc9a83095b297738b79c8980c
authorMarc Mutz <marc.mutz@qt.io>
committerMarc Mutz <marc.mutz@qt.io>
commit timeFri, 18 Aug 2023 10:22:24 +0200