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>