Fix history state index handling
The history state is not present in the generated statemachines,
and the states following a history state have a state index that is
lower than what the actual statemachine considers. This patch adjusts
the index calculation on the statemachine side.
The scion test suite history tests passed because it used the
activeStateNames() method for verifying which states are active.
That method worked. This commit also now amends the scion
verification to cover the metaobject access and (de-)activation
signal emissions; the scion history tests would now fail without
the index handling adaptation of this patch.
Pick-to: 6.2 6.4 5.15
Fixes: QTBUG-80262
Change-Id: Ifc509794bf3dca6c81e969e8a4e2bbaf9618d275
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>