SignalHandler: eradicate the last two Q_FOREACH in the class


Use a "consume-loop" over m_connectionsCounter to insulate the loops
from potenial re-entry into the class (disconnectNotify() calls
unknown code).

Yes, this sheds the QHash's capacity(). If this becomes a problem, it
can be fixed by moving oldConnectionsCounter back into
m_connectionsCounter, after clear()ing it.

Sister change to 485727b41ed777ee9392be8aa770adb1b4415aa6.

Change-Id: I73f8a16356258b8af210a8b3e7b00c523ca169e4
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
commit95c5c901d16edd7fb5a83767258c6c88bb6bfc8d
parent8e8b51abfdd891e969eb2534b70ed1bb52573db8
authorMarc Mutz <marc.mutz@qt.io>
committerMarc Mutz <marc.mutz@qt.io>
commit timeFri, 4 Aug 2023 22:43:15 +0200