diff options
author | Ivan Solovev <ivan.solovev@qt.io> | 2023-03-20 16:57:27 +0100 |
---|---|---|
committer | Ivan Solovev <ivan.solovev@qt.io> | 2023-04-05 13:38:15 +0200 |
commit | 028c367f757b98008bb9209252e5617758c88e0a (patch) | |
tree | 528e3de4ccca38286b6b06a4ac9a0c2bbbd5b14b /src/corelib/thread/qfuture.h | |
parent | 9b4b32ec98bf80023d2233a061564dfe59b783c7 (diff) |
Deprecate QtFuture::makeReadyFuture()
[ChangeLog][Deprecation Notice][QtCore] The QtFuture::makeReadyFuture()
method and all its specializations are deprecated since Qt 6.10.
The reason for the deprecation is that the method has a
makeReadyFuture(const QList<T> &) overload, which behaves differently
from all other overloads (including other non-const ref QList
overloads).
Use QtFuture::makeReadyVoidFuture() when you need a ready void QFuture,
or QtFuture::makeReadyValueFuture() when you need to propagate the
input type to the returned QFuture, or QtFuture::makeReadyRangeFuture()
when you need to create a multi-value future based on an input
container.
Fixes: QTBUG-109677
Change-Id: I55125269989df0a02840d5ddd5763ef5f1070df5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/corelib/thread/qfuture.h')
-rw-r--r-- | src/corelib/thread/qfuture.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/thread/qfuture.h b/src/corelib/thread/qfuture.h index 219d3368f0..572c8054f9 100644 --- a/src/corelib/thread/qfuture.h +++ b/src/corelib/thread/qfuture.h @@ -522,15 +522,18 @@ QFuture<std::variant<std::decay_t<Futures>...>> whenAny(Futures &&... futures); #endif // Q_QDOC +#if QT_DEPRECATED_SINCE(6, 10) #if defined(Q_QDOC) static QFuture<void> makeReadyFuture() #else template<typename T = void> +QT_DEPRECATED_VERSION_X(6, 10, "Use makeReadyVoidFuture() instead") static QFuture<T> makeReadyFuture() #endif { return makeReadyVoidFuture(); } +#endif // QT_DEPRECATED_SINCE(6, 10) } // namespace QtFuture |