diff options
Diffstat (limited to 'src/corelib/thread/qfuture.h')
-rw-r--r-- | src/corelib/thread/qfuture.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/corelib/thread/qfuture.h b/src/corelib/thread/qfuture.h index 5b618e5acb..5939a93780 100644 --- a/src/corelib/thread/qfuture.h +++ b/src/corelib/thread/qfuture.h @@ -55,7 +55,7 @@ public: return *this; } -#if defined(Q_CLANG_QDOC) +#if defined(Q_QDOC) ~QFuture() { } QFuture(const QFuture<T> &) { } QFuture<T> & operator=(const QFuture<T> &) { } @@ -155,7 +155,7 @@ QT_WARNING_POP template<class Function, typename = std::enable_if_t<std::is_invocable_r_v<T, Function>>> QFuture<T> onCanceled(QObject *context, Function &&handler); -#if !defined(Q_CLANG_QDOC) +#if !defined(Q_QDOC) template<class U = T, typename = std::enable_if_t<QtPrivate::isQFutureV<U>>> auto unwrap(); #else @@ -445,7 +445,7 @@ struct MetaTypeQFutureHelper<QFuture<T>> namespace QtFuture { -#ifndef Q_CLANG_QDOC +#ifndef Q_QDOC template<typename OutputSequence, typename InputIt, typename ValueType = typename std::iterator_traits<InputIt>::value_type, @@ -520,7 +520,20 @@ QFuture<QtFuture::WhenAnyResult<T>> whenAny(InputIt first, InputIt last); template<typename... Futures> QFuture<std::variant<std::decay_t<Futures>...>> whenAny(Futures &&... futures); -#endif // Q_CLANG_QDOC +#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 |