Do not start simulation threads when Qt has no thread support


PhysicsWorld asks the PhysX CPU dispatcher for worker threads, by
default QThread::idealThreadCount() of them. Where Qt is built without
thread support, such as for WebAssembly without threads,
pthread_create() fails, and PhysX waits forever for the thread to start,
so any scene with a PhysicsWorld hung on its first frame.

Always run the simulation on the calling thread there, which is what a
dispatcher without worker threads does.

Task-number: QTBUG-151206
Pick-to: 6.12
Assisted-by: Claude Code
Change-Id: I80eee988f342cc280d731053bb0d965e1a048155
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
commit2ddf3ae01ee99c02c2246aa9bea95e5b4df1f2ff
parent13a69ad85e1e186de7d48280d168058fd6215764
authorJonas Karlsson <jonas.karlsson@qt.io>
committerJonas Karlsson <jonas.karlsson@qt.io>
commit timeTue, 20 Oct 2026 07:59:26 +0000