Commit Graph

7 Commits

Author SHA1 Message Date
Eike Ziller
c676ec825f AsyncTask: Centralize setting global future synchronizer
Move the global FutureSynchronizer to Utils and use it
by default for AsyncTask (if that is in the main thread).
This way setting a synchronizer is less prone to be forgotten.
Individual uses can still override this.

Change-Id: I1a12bf4d7f4cb5be99668bf0a4797108c2fe6448
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-05-21 09:56:32 +00:00
Leena Miettinen
8c288bf05f Doc: Add "\inmodule QtCreator" to \class and \namespace docs
To get rid of QDoc warnings.

Change-Id: Idd39b7ae4327798c376f424c94d6617bcaee2258
Reviewed-by: hjk <hjk@qt.io>
2023-05-22 12:48:35 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
Marc Mutz
8eb4d52342 Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.

Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.

Task-number: QTBUG-99313
Change-Id: I88edd91395849574436299b8badda21bb93bea39
Reviewed-by: hjk <hjk@qt.io>
2022-10-07 13:47:53 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
Jarek Kobus
69b3c6c1fd Use Utils::FutureSynchronizer in IosSimulatorToolHandlerPrivate
Add a new method: void FutureSynchronizer::cancelAllFutures().

Change-Id: I5a4e1ea3230ac3c0ce9d3f26b751b2c05fe3dfd4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-25 10:13:11 +00:00
Jarek Kobus
c4236da9d1 Introduce Utils::FutureSynchronizer
The API is nearly the same as QFutureSynchronizer.

The differences are:
1. We don't make this class a template class, however,
   we are leaving some template methods, like addFuture().
   For the scope of future synchronizing there is no need
   for QFuture<T> API, the QFuture<void> is sufficient.
2. Renamed cancelOnWait() getter to isCancelOnWait()
   in order to conform more to Qt API naming rules.
3. Removed futures() getter and provided isEmpty() instead.
4. Removed c'tor that takes a future and setFuture().
   These 2 methods were superfluous and may easily be
   substituted with other methods from the existing API.

The additional feature is about flushing finished futures.
This can be done on demand by a call to flushFinishedFutures(),
or is done automatically on every call to addFuture().

Change-Id: I6a323c9481eeeea9235e6b6e3048cef02873da08
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-12 11:06:42 +00:00