Qt StateMachine: fix binding loops


All bindable properties were not breaking the binding if the new value
was the same as the old one. This is incorrect, so fix the logic.
Also, use (set)ValueBypassingBindings() to access the properties.
Update some helper functions in QStateMachinePrivate to also use these
methods instead of directly accessing the properties.

Some of the QState's properties cannot really be tested for the binding
loops with the current approach, because they require that the new
state belongs to the same object. Explicitly pass a lambda that returns
a nullptr as a helperConstrucor parameter for such cases, meaning that
binding loop checks will be skipped. In practice these property setters
are trivial, so they will not cause binding loops.

Pick-to: 6.6 6.5
Task-number: QTBUG-116542
Change-Id: If02c35df2b9c651c7f21f6f85752912e56688c71
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
commit205e3da5ec7899f325f88ce0e5e7497bba6a046b
parent2d459667f3e9910b63964417969b7aa4583b3ad6
authorIvan Solovev <ivan.solovev@qt.io>
committerIvan Solovev <ivan.solovev@qt.io>
commit timeFri, 6 Oct 2023 12:55:09 +0200