The multi-thread snippet in the documentation, when copied as is,
could actually crash because of the race condition between the main
thread and the thread that generate results for the promise.
This is fixed by explicitly calling QPromise::start().
Actually, the underlying snippet already has this call, it just was
not included in the documentation.
This patch modifies the documentation snippet to include calls to
both QPromise::start() and QPromise::finish().
Fixes: QTBUG-109230
Pick-to: 6.5 6.4 6.2
Change-Id: Ic25f31a6b3b16ba6bc06a0b199289c8c5d50bab6
Reviewed-by: Sona Kurazyan <kurazyan.sona@gmail.com>