Fix Qt-RangeLoopDetach warning in structured bindings


Several range-for loops are iterating over variables obtained via
structured bindings. The warning was triggered because the variables
are non-const.

Could be fixed in a usual way by wrapping the usages in std::as_const(),
but a better solution would be to initially declare them const.

Amends e77c98352c584bac7b752dde21c93ff09f78b00d
and c03d630e6d9631791d0668b64025bd82796a55ce.
Both of them do not exist in 6.8, so picking only down to 6.11.

Axivion-Id: qt_Add-ons_qtremoteobjects_dev_linux:SV251
Axivion-Id: qt_Add-ons_qtremoteobjects_dev_linux:SV252
Axivion-Id: qt_Add-ons_qtremoteobjects_dev_linux:SV253
Axivion-Id: qt_Add-ons_qtremoteobjects_dev_linux:SV254
Task-number: QTBUG-144772
Pick-to: 6.12 6.11
Change-Id: Ia0fb7da547798d3a05a5c928f423692dc7706d28
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
commitb4d8c52362e498622b3627bd501b65103ae6ad5d
parent8028972dc58e7ad776407c6136568125703cca4c
authorIvan Solovev <ivan.solovev@qt.io>
committerIvan Solovev <ivan.solovev@qt.io>
commit timeMon, 27 Jul 2026 11:20:27 +0000