SignalHandler: simplify remove()


Use take() instead of a find()—std::move(it.value())—erase() and put
the result directly into the ranged for loop and drop the const from
the loop variable, so we don't pass const Connections to disconnect(),
something that we intend to deprecate, because disconnect(), despite
taking by cref, modifies its argument.

Amends acf7f0b1ae956f2fac7182c194e0441cd9c6f4d0 (5.4).

Task-number: QTBUG-144929
Pick-to: 6.11 6.10 6.8
Change-Id: I158f50aaf73cbe39772deede2b8d9a31a84e5286
Reviewed-by: Arno Rehn <a.rehn@menlosystems.com>
commit704662d6bc66451529629973ac1a8356d7a5501c
parent1de9cf86dd066299d6e37e8f226b5b5b9d3fb43d
authorMarc Mutz <marc.mutz@qt.io>
committerMarc Mutz <marc.mutz@qt.io>
commit timeWed, 25 Mar 2026 10:49:06 +0100