Don't call fetchResults() unconditionally
The QPhysicsWorld destructor called PxScene::fetchResults()
unconditionally, even when the last simulate() call's results had
already been fetched and no new simulate() had been issued since. PhysX
rejects that as an illegal call ("fetchResults() called illegally! It
must be called after advance() or simulate()"), which showed up as a
warning during test teardown.
Only fetch when a simulate() call is actually outstanding, matching
the invariant simulateFrame() already tracks via m_frameFetched.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Pick-to: 6.12 6.11 6.8
Change-Id: Ic5fdf82fef1025005bd215853b1a5fdecdc8d8b6
Reviewed-by: Kristoffer Skau <kristoffer.skau@qt.io>