Files
qt-creator/src/plugins/python/pythonsettings.h
Jarek Kobus d95fa019d4 PythonSettings: Don't leak running watchers
Detected by memory analyzer.
When shutdown comes while pythonsFromRegistry() or
pythonsFromPath() is still running, the corresponding
QFutureWatcher is leaked.

Employ TaskTreeRunner instead. It handles the cancellation
of the running tasks automatically on its destruction.

Make pythonsFromRegistry() and pythonsFromPath() cancelable,
by providing QPromise as a parameter and check for canceled
state on every iteration.

Change-Id: Iae7c7d1ed764646b8203bd7ca8b9580cb999b80c
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-02-16 06:21:44 +00:00

3.0 KiB