FutureSynchronizer: Change the default value of cancelOnWait to true

The "false" default wasn't really useful.

This changes the default value to the following usages:

1. AndroidDeployQtStep
   Introduced in 91f136ef3a
   The synchronizer was used to cancel the running tasks inside
   the doCancel(), so the similar behavior should be expected
   when destructing the AndroidDeployQtStep.

2. GitClient
   Introduced in f3106ebafe
   Is used only inside the last line of
   GitSubmitEditor::updateFileModel(). The running function
   (CommitDataFetchResult::fetch) doesn't take QPromise<>,
   so it can't detect if the future was canceled or not.
   In this case this change is no-op.

3. ExtraCompiler
   Introduced in c99ce1f455
   The intention was to make it cancellable and finish
   early on cancel.

4. PluginManager global future synchronizer
   Introduced in 72bddf9f51
   The intention was to make it cancellable and finish
   early on cancel.

The relevant places in code are marked explicitly for
points: 1, 2 and 3.

Change-Id: I1a52deb8d1f81d355950c8772bbaa6d0a202fd7e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Jarek Kobus
2023-04-25 17:48:43 +02:00
parent 20f1ff22d7
commit 070bfe9387
20 changed files with 9 additions and 33 deletions

View File

@@ -133,6 +133,7 @@ private:
Environment m_environment;
AndroidDeviceInfo m_deviceInfo;
// The synchronizer has cancelOnWait set to true by default.
FutureSynchronizer m_synchronizer;
};