QQmlWebChannel: port away from Q_FOREACH [2/2]: loop over transports


As mentioned in the code comment, disconnectFrom() modifies the
container, and requires the item to be found in the container before
it actually disconnects. So we can't use a consume loop to avoid the
detach (which existed for the Q_FOREACH, too, of course).

So add an explanatory comment, take a copy and use a ranged-for loop
to iterate the copy.

This removes the last Q_FOREACH in this file, so remove the undef and
the NO_PCH_SOURCES.

This was also the last Q_FOREACH loop in this module, so.

Fixes: QTBUG-115802
Pick-to: 6.11
Change-Id: I5e04b5e4f6c4ed7946c4e93fe6831c1856d547bc
Reviewed-by: Arno Rehn <a.rehn@menlosystems.com>
commitafb858ed285c7a8ff1538a708dd2b2de6b3a9adc
parent704662d6bc66451529629973ac1a8356d7a5501c
authorMarc Mutz <marc.mutz@qt.io>
committerMarc Mutz <marc.mutz@qt.io>
commit timeWed, 25 Mar 2026 10:49:54 +0100