Capture connection handle safely into statusChanged() handler lambda


Code captured a reference to a local 'connection' variable, which likely
won't work properly; the lambda's disconnect() call in all likelihood
happens after the local 'connection' variable is already destroyed.

Pick-to: 6.11 6.10 6.8 6.5
Task-number: QTBUG-144763
Axivion-Id: qt_Add-ons_qtnetworkauth_dev_linux:SV8
Change-Id: I8ff2f3046133e702582d056467e350e74310dfb5
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
commit8a459a8cbb866621c93cccdf80c4842d3bab98d1
parent0740f4b57d91222eee855e8da651f64f8683075d
authorJuha Vuolle <juha.vuolle@qt.io>
committerJuha Vuolle <juha.vuolle@qt.io>
commit timeMon, 9 Mar 2026 08:49:27 +0200