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>
commit90415ae9627be0b385f3c28eb0f6f59131e478e2
parent38a2cbe6186ec081985dacd1d863c16e37ab8c8b
authorJonas Karlsson <jonas.karlsson@qt.io>
committerJonas Karlsson <jonas.karlsson@qt.io>
commit timeWed, 5 Aug 2026 12:23:01 +0000