Init physics only when running is set to true


This fixes for instance the friction test where typicalLength and
typicalSpeed values were ignored since the simulation was already
running. This caused the box to slide and freeze in seemingly random
ways. Bug introduced in commit 7b03e51af20732f21ada9dd6b1a47f93fd1d1422.

Pick-to: 6.5 6.4
Change-Id: Id6b9f739cdee7cfe9153fd9d4c2234edf2883485
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
commit40ef480f0abf120db7210691e69fd2dc0b54332a
parent1f3532100ce649537264dfe16737bbd626b03733
authorJonas Karlsson <jonas.karlsson@qt.io>
committerJonas Karlsson <jonas.karlsson@qt.io>
commit timeTue, 24 Jan 2023 14:40:45 +0100