5#error Do not include qfuture_impl.h directly
9#pragma qt_sync_skip_header_check
10#pragma qt_sync_stop_processing
13#include <QtCore/qglobal.h>
14#include <QtCore/qfutureinterface.h>
15#include <QtCore/qthreadpool.h>
16#include <QtCore/qexception.h>
17#include <QtCore/qpromise.h>
57template<
typename F,
typename Arg,
typename Enable =
void>
63template<
typename F,
typename Arg>
65 F, Arg, typename
std::enable_if_t<!std::is_invocable_v<std::decay_t<F>, QFuture<Arg>>>>
67 using ResultType = std::invoke_result_t<std::decay_t<F>, std::decay_t<Arg>>;
71template<
class F,
class Arg>
73 F, Arg, typename
std::enable_if_t<std::is_invocable_v<std::decay_t<F>, QFuture<Arg>>>>
75 using ResultType = std::invoke_result_t<std::decay_t<F>, QFuture<Arg>>;
81 F,
void, typename
std::enable_if_t<std::is_invocable_v<std::decay_t<F>, QFuture<void>>>>
83 using ResultType = std::invoke_result_t<std::decay_t<F>, QFuture<void>>;
89 F,
void, typename
std::enable_if_t<!std::is_invocable_v<std::decay_t<F>, QFuture<void>>>>
91 using ResultType = std::invoke_result_t<std::decay_t<F>>;
96template<
class T,
class Enable =
void>
102 std::is_class_v<class T::QPrivateSignal>
105template<
class Tuple, std::size_t... I>
108 return std::make_tuple(std::get<I>(
t)...);
111template<
class Arg,
class... Args>
114 using TupleType = std::tuple<std::decay_t<Arg>, std::decay_t<Args>...>;
115 constexpr auto Size =
sizeof...(Args);
116 if constexpr (QtPrivate::IsPrivateSignalArg<std::tuple_element_t<Size, TupleType>>) {
117 if constexpr (Size == 1) {
118 return std::forward<Arg>(
arg);
120 return cutTuple(std::make_tuple(std::forward<Arg>(
arg), std::forward<Args>(
args)...),
121 std::make_index_sequence<Size>());
124 return std::make_tuple(std::forward<Arg>(
arg), std::forward<Args>(
args)...);
130template<
class Arg,
class... Args>
132 std::conditional_t<(
sizeof...(Args) > 0),
133 std::invoke_result_t<
decltype(
createTuple<Arg, Args...>), Arg, Args...>,
134 std::conditional_t<IsPrivateSignalArg<Arg>,
void, Arg>>;
139template<
typename Arg,
typename... Args>
145 static const bool HasExtraArgs = (
sizeof...(Args) > 0);
146 using AllArgs = FilterLastPrivateSignalArg<std::decay_t<Arg>, std::decay_t<Args>...>;
148 template<
class Class,
class Callable>
149 static const bool CanInvokeWithArgs = std::is_invocable_v<
Callable, Class, Arg, Args...>;
152template<
typename Arg,
typename... Args>
158 static const bool HasExtraArgs = (
sizeof...(Args) > 0);
159 using AllArgs = FilterLastPrivateSignalArg<QPromise<Arg>, std::decay_t<Args>...>;
161 template<
class Class,
class Callable>
162 static const bool CanInvokeWithArgs = std::is_invocable_v<Callable, Class, QPromise<Arg> &, Args...>;
171 static const bool HasExtraArgs =
false;
174 template<
class Class,
class Callable>
175 static const bool CanInvokeWithArgs = std::is_invocable_v<Callable, Class>;
188template<
typename R,
typename... Args>
193template<
typename R,
typename... Args>
198template<
typename R,
typename... Args>
203template<
typename R,
typename... Args>
208template<
typename R,
typename... Args>
213template<
typename Class,
typename R,
typename... Args>
218template<
typename Class,
typename R,
typename... Args>
223template<
typename Class,
typename R,
typename... Args>
228template<
typename Class,
typename R,
typename... Args>
233template<
typename Class,
typename R,
typename... Args>
238template<
typename Class,
typename R,
typename... Args>
243template<
class Class,
class Callable>
251inline constexpr bool isQFutureV<QFuture<T>> =
true;
267template<
class... Args>
268using NotEmpty = std::bool_constant<(
sizeof...(Args) > 0)>;
270template<
class Sequence>
272 std::is_convertible<
typename std::iterator_traits<std::decay_t<
decltype(
273 std::begin(std::declval<Sequence>()))>>::iterator_category,
274 std::random_access_iterator_tag>;
276template<
class Sequence>
278 std::is_convertible<
typename std::iterator_traits<std::decay_t<
decltype(
279 std::begin(std::declval<Sequence>()))>>::iterator_category,
280 std::input_iterator_tag>;
282template<
class Iterator>
284 std::is_convertible<typename std::iterator_traits<Iterator>::iterator_category,
285 std::forward_iterator_tag>;
287template<
typename Function,
typename ResultType,
typename ParentResultType>
292 template<
typename F = Function>
301 template<
typename F = Function>
302 static void create(F &&
func, QFuture<ParentResultType> *
f, QFutureInterface<ResultType> &fi,
305 template<
typename F = Function>
306 static void create(F &&
func, QFuture<ParentResultType> *
f, QFutureInterface<ResultType> &fi,
309 template<
typename F = Function>
310 static void create(F &&
func, QFuture<ParentResultType> *
f, QFutureInterface<ResultType> &fi,
314 void fulfillPromiseWithResult();
315 void fulfillVoidPromise();
316 void fulfillPromiseWithVoidResult();
318 template<
class... Args>
319 void fulfillPromise(Args &&...
args);
332template<
typename Function,
typename ResultType,
typename ParentResultType>
336 template<
typename F = Function>
349template<
typename Function,
typename ResultType,
typename ParentResultType>
351 public Continuation<Function, ResultType, ParentResultType>
354 template<
typename F = Function>
381#ifndef QT_NO_EXCEPTIONS
383template<
class Function,
class ResultType>
387 template<
typename F = Function>
388 static void create(F &&function, QFuture<ResultType> *
future,
389 const QFutureInterface<ResultType> &fi);
391 template<
typename F = Function>
392 static void create(F &&function, QFuture<ResultType> *
future, QFutureInterface<ResultType> &fi,
395 template<
typename F = Function>
397 : promise(
std::move(
p)), parentFuture(
f), handler(
std::forward<F>(
func))
405 template<
class ArgType>
406 void handleException();
407 void handleAllExceptions();
410 QPromise<ResultType> promise;
411 QFuture<ResultType> parentFuture;
417template<
typename Function,
typename ResultType,
typename ParentResultType>
422 Q_ASSERT(parentFuture.isFinished());
424#ifndef QT_NO_EXCEPTIONS
427 if constexpr (!std::is_void_v<ResultType>) {
428 if constexpr (std::is_void_v<ParentResultType>) {
429 fulfillPromiseWithVoidResult();
430 }
else if constexpr (std::is_invocable_v<Function, ParentResultType>) {
431 fulfillPromiseWithResult();
435 static_assert(std::is_invocable_v<Function, QFuture<ParentResultType>>,
436 "The continuation is not invocable with the provided arguments");
440 if constexpr (std::is_void_v<ParentResultType>) {
441 if constexpr (std::is_invocable_v<Function, QFuture<void>>)
445 }
else if constexpr (std::is_invocable_v<Function, ParentResultType>) {
446 fulfillVoidPromise();
450 static_assert(std::is_invocable_v<Function, QFuture<ParentResultType>>,
451 "The continuation is not invocable with the provided arguments");
455#ifndef QT_NO_EXCEPTIONS
457 promise.setException(std::current_exception());
463template<
typename Function,
typename ResultType,
typename ParentResultType>
466 Q_ASSERT(parentFuture.isFinished());
468 if (parentFuture.d.isChainCanceled()) {
469#ifndef QT_NO_EXCEPTIONS
470 if (parentFuture.d.hasException()) {
475 if constexpr (!std::is_invocable_v<std::decay_t<Function>, QFuture<ParentResultType>>) {
477 promise.setException(parentFuture.d.exceptionStore().exception());
485 promise.future().cancel();
496template<
class Function>
503 Q_ASSERT_X(
false,
"QFuture",
"Continuation shouldn't be copied");
514template<
typename Function,
typename ResultType,
typename ParentResultType>
517 QFuture<ParentResultType> *
f,
518 QFutureInterface<ResultType> &fi,
527 launchAsync =
f->d.launchAsync();
530 if (launchAsync &&
f->d.threadPool()) {
531 pool =
f->d.threadPool();
532 fi.setThreadPool(
pool);
536 fi.setLaunchAsync(launchAsync);
540 const auto parent = QFutureInterface<ParentResultType>(parentData).future();
541 Continuation<Function, ResultType, ParentResultType> *continuationJob =
nullptr;
543 auto asyncJob =
new AsyncContinuation<Function, ResultType, ParentResultType>(
544 std::forward<Function>(
func), parent, std::move(promise_),
pool);
545 fi.setRunnable(asyncJob);
546 continuationJob = asyncJob;
548 continuationJob =
new SyncContinuation<Function, ResultType, ParentResultType>(
549 std::forward<Function>(
func), parent, std::move(promise_));
552 bool isLaunched = continuationJob->execute();
556 if (!(launchAsync && isLaunched)) {
557 delete continuationJob;
558 continuationJob =
nullptr;
564template<
typename Function,
typename ResultType,
typename ParentResultType>
567 QFuture<ParentResultType> *
f,
568 QFutureInterface<ResultType> &fi,
573 fi.setLaunchAsync(
true);
574 fi.setThreadPool(
pool);
578 const auto parent = QFutureInterface<ParentResultType>(parentData).future();
579 auto continuationJob =
new AsyncContinuation<Function, ResultType, ParentResultType>(
580 std::forward<Function>(
func), parent, std::move(promise_),
pool);
581 bool isLaunched = continuationJob->execute();
585 delete continuationJob;
586 continuationJob =
nullptr;
592template <
typename Continuation>
597 QtPrivate::makeCallableObject<Prototype>(std::forward<Continuation>(
c)),
601template<
typename Function,
typename ResultType,
typename ParentResultType>
604 QFuture<ParentResultType> *
f,
605 QFutureInterface<ResultType> &fi,
614 auto continuation = [
func = std::forward<F>(
func), parent = *
f,
615 promise_ =
QPromise(fi)]()
mutable {
616 SyncContinuation<Function, ResultType, ParentResultType> continuationJob(
617 std::forward<Function>(
func), parent, std::move(promise_));
618 continuationJob.execute();
624template<
typename Function,
typename ResultType,
typename ParentResultType>
627 if constexpr (std::is_copy_constructible_v<ParentResultType>)
633template<
typename Function,
typename ResultType,
typename ParentResultType>
634void Continuation<Function, ResultType, ParentResultType>::fulfillVoidPromise()
636 if constexpr (std::is_copy_constructible_v<ParentResultType>)
639 function(parentFuture.takeResult());
642template<
typename Function,
typename ResultType,
typename ParentResultType>
643void Continuation<Function, ResultType, ParentResultType>::fulfillPromiseWithVoidResult()
645 if constexpr (std::is_invocable_v<Function, QFuture<void>>)
651template<
typename Function,
typename ResultType,
typename ParentResultType>
652template<
class... Args>
653void Continuation<Function, ResultType, ParentResultType>::fulfillPromise(Args &&...
args)
655 promise.addResult(std::invoke(function, std::forward<Args>(
args)...));
661 if constexpr (!std::is_void_v<T>) {
662 if constexpr (std::is_copy_constructible_v<T>)
669template<
class T,
class Function>
672 if constexpr (std::is_void_v<T>)
675 promise.addResult(handler());
678#ifndef QT_NO_EXCEPTIONS
680template<
class Function,
class ResultType>
683 const QFutureInterface<ResultType> &fi)
687 auto failureContinuation = [function = std::forward<F>(function), promise_ =
QPromise(fi)](
689 const auto parent = QFutureInterface<ResultType>(parentData).future();
690 FailureHandler<Function, ResultType> failureHandler(std::forward<Function>(function),
691 parent, std::move(promise_));
692 failureHandler.run();
698template<
class Function,
class ResultType>
701 QFutureInterface<ResultType> &fi,
706 auto failureContinuation = [function = std::forward<F>(function),
708 FailureHandler<Function, ResultType> failureHandler(
709 std::forward<Function>(function), parent, std::move(promise_));
710 failureHandler.run();
716template<
class Function,
class ResultType>
719 Q_ASSERT(parentFuture.isFinished());
723 if (parentFuture.d.hasException()) {
725 if constexpr (std::is_void_v<ArgType>) {
726 handleAllExceptions();
728 handleException<ArgType>();
730 }
else if (parentFuture.d.isChainCanceled()) {
731 promise.future().cancel();
738template<
class Function,
class ResultType>
739template<
class ArgType>
743 Q_ASSERT(parentFuture.d.hasException());
744 parentFuture.d.exceptionStore().rethrowException();
745 }
catch (
const ArgType &e) {
748 if constexpr (std::is_void_v<ResultType>)
751 promise.addResult(handler(e));
753 promise.setException(std::current_exception());
758 promise.setException(std::current_exception());
762template<
class Function,
class ResultType>
763void FailureHandler<Function, ResultType>::handleAllExceptions()
766 Q_ASSERT(parentFuture.d.hasException());
767 parentFuture.d.exceptionStore().rethrowException();
772 promise.setException(std::current_exception());
779template<
class Function,
class ResultType>
783 template<
class F = Function>
784 static void create(F &&handler, QFuture<ResultType> *
future, QFutureInterface<ResultType> &fi)
788 auto canceledContinuation = [promise =
QPromise(fi), handler = std::forward<F>(handler)](
790 auto parentFuture = QFutureInterface<ResultType>(parentData).future();
791 run(std::forward<F>(handler), parentFuture, std::move(promise));
796 template<
class F = Function>
797 static void create(F &&handler, QFuture<ResultType> *
future, QFutureInterface<ResultType> &fi,
802 auto canceledContinuation = [handler = std::forward<F>(handler),
804 run(std::forward<F>(handler), parentFuture, std::move(promise));
810 template<
class F = Function>
811 static void run(F &&handler, QFuture<ResultType> &parentFuture, QPromise<ResultType> &&promise)
815 if (parentFuture.isCanceled()) {
816#ifndef QT_NO_EXCEPTIONS
817 if (parentFuture.d.hasException()) {
819 promise.setException(parentFuture.d.exceptionStore().exception());
824#ifndef QT_NO_EXCEPTIONS
826 promise.setException(std::current_exception());
849 outer->then([promise](
const QFuture<ResultType> &outerFuture)
mutable {
854#ifndef QT_NO_EXCEPTIONS
855 if (outerFuture.d.hasException()) {
856 promise.reportStarted();
857 promise.reportException(outerFuture.d.exceptionStore().exception());
858 promise.reportFinished();
863 promise.reportStarted();
864 ResultType nestedFuture = outerFuture.result();
866 nestedFuture.then([promise] (
const QFuture<NestedType> &nested)
mutable {
867#ifndef QT_NO_EXCEPTIONS
868 if (nested.d.hasException()) {
869 promise.reportException(nested.d.exceptionStore().exception());
873 if constexpr (!std::is_void_v<NestedType>)
874 promise.reportResults(nested.results());
876 promise.reportFinished();
877 }).onCanceled([promise] ()
mutable {
878 promise.reportCanceled();
879 promise.reportFinished();
881 }).onCanceled([promise]()
mutable {
883 promise.reportStarted();
884 promise.reportCanceled();
885 promise.reportFinished();
887 return promise.future();
891template<
typename ValueType>
894 QFutureInterface<ValueType> promise;
895 promise.reportStarted();
896 promise.reportResults(
values);
897 promise.reportFinished();
898 return promise.future();
905template<
class Signal>
908template<
class Sender,
class Signal,
typename = QtPrivate::EnableIfInvocable<Sender, Signal>>
912 QFutureInterface<ArgsType> promise;
913 promise.reportStarted();
915 promise.reportCanceled();
916 promise.reportFinished();
917 return promise.future();
920 using Connections = std::pair<QMetaObject::Connection, QMetaObject::Connection>;
921 auto connections = std::make_shared<Connections>();
923 if constexpr (std::is_void_v<ArgsType>) {
928 promise.reportFinished();
932 [promise, connections](
auto...
values)
mutable {
937 promise.reportFinished();
944 promise.reportResult(
value);
945 promise.reportFinished();
949 if (!connections->first) {
950 promise.reportCanceled();
951 promise.reportFinished();
952 return promise.future();
955 connections->second =
959 promise.reportCanceled();
960 promise.reportFinished();
963 return promise.future();
966template<
typename Container>
968 std::enable_if_t<QtPrivate::HasInputIterator<Container>::value,
bool>;
970template<
typename Container>
972 typename std::iterator_traits<
decltype(
973 std::cbegin(std::declval<Container&>()))>::value_type;
975template<
typename Container, if_container_with_input_iterators<Container> = true>
980 using ValueType = ContainedType<Container>;
981 if constexpr (std::is_convertible_v<q20::remove_cvref_t<Container>, QList<ValueType>>) {
985 std::cend(container)});
989template<
typename ValueType>
998 QFutureInterface<std::decay_t<T>> promise;
999 promise.reportStarted();
1000 promise.reportResult(std::forward<T>(
value));
1001 promise.reportFinished();
1003 return promise.future();
1008#if QT_DEPRECATED_SINCE(6, 10)
1009template<
typename T,
typename = QtPrivate::EnableForNonVo
id<T>>
1027#ifndef QT_NO_EXCEPTIONS
1029template<
typename T =
void>
1032 QFutureInterface<T> promise;
1033 promise.reportStarted();
1034 promise.reportException(exception);
1035 promise.reportFinished();
1037 return promise.future();
1040template<
typename T =
void>
1046 return makeExceptionalFuture<T>(std::current_exception());
1057template<
typename ResultFutures>
1064 template<
typename T = ValueType>
1070 if (oldRemaining <= 1) {
1081template<
typename ResultType>
1086 template<
typename T = ResultType,
typename = EnableForNonVo
id<T>>
1099template<
qsizetype Index,
typename ContextType,
typename... Ts>
1101 const std::tuple<Ts...> &
t)
1103 auto future = std::get<Index>(
t);
1104 using ResultType =
typename ContextType::ValueType;
1107 context->checkForCompletion(Index, ResultType { std::in_place_index<Index>,
f });
1109 context->checkForCompletion(Index, ResultType { std::in_place_index<Index>,
future });
1112 if constexpr (Index != 0)
1113 addCompletionHandlersImpl<Index - 1, ContextType, Ts...>(
context,
t);
1116template<
typename ContextType,
typename... Ts>
1123template<
typename OutputSequence,
typename InputIt,
typename ValueType>
1130 const auto context = std::make_shared<QtPrivate::WhenAllContext<OutputSequence>>(
size);
1138 context->checkForCompletion(idx,
f);
1140 context->checkForCompletion(idx,
f);
1143 return context->promise.future();
1146template<
typename OutputSequence,
typename... Futures>
1150 const auto context = std::make_shared<QtPrivate::WhenAllContext<OutputSequence>>(
size);
1156 return context->promise.future();
1159template<
typename InputIt,
typename ValueType>
1172 const auto context = std::make_shared<QtPrivate::WhenAnyContext<ResultType>>();
1184 return context->promise.future();
1187template<
typename... Futures>
1188QFuture<std::variant<std::decay_t<Futures>...>>
whenAnyImpl(Futures &&... futures)
1190 using ResultType = std::variant<std::decay_t<Futures>...>;
1192 const auto context = std::make_shared<QtPrivate::WhenAnyContext<ResultType>>();
1197 return context->promise.future();
T fetchAndStoreRelaxed(T newValue) noexcept
T fetchAndSubRelaxed(T valueToAdd) noexcept
virtual void raise() const
In your QException subclass, reimplement raise() like this:
QFuture< ResultType< Function > > then(Function &&function)
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
\threadsafe
void destroyed(QObject *=nullptr)
This signal is emitted immediately before the object obj is destroyed, after any instances of QPointe...
bool addResult(U &&result, int index=-1)
void start(QRunnable *runnable, int priority=0)
Reserves a thread and uses it to run runnable, unless this thread will make the current thread count ...
static QThreadPool * globalInstance()
Returns the global QThreadPool instance.
~AsyncContinuation() override=default
AsyncContinuation(F &&func, const QFuture< ParentResultType > &f, QPromise< ResultType > &&p, QThreadPool *pool=nullptr)
void run() override
Implement this pure virtual function in your subclass.
static void create(F &&handler, QFuture< ResultType > *future, QFutureInterface< ResultType > &fi, QObject *context)
static void create(F &&handler, QFuture< ResultType > *future, QFutureInterface< ResultType > &fi)
static void run(F &&handler, QFuture< ResultType > &parentFuture, QPromise< ResultType > &&promise)
QFuture< ParentResultType > parentFuture
Continuation(F &&func, const QFuture< ParentResultType > &f, QPromise< ResultType > &&p)
virtual ~Continuation()=default
static void create(F &&func, QFuture< ParentResultType > *f, QFutureInterface< ResultType > &fi, QtFuture::Launch policy)
QPromise< ResultType > promise
static void create(F &&function, QFuture< ResultType > *future, const QFutureInterface< ResultType > &fi)
FailureHandler(F &&func, const QFuture< ResultType > &f, QPromise< ResultType > &&p)
~SyncContinuation() override=default
SyncContinuation(F &&func, const QFuture< ParentResultType > &f, QPromise< ResultType > &&p)
QSet< QString >::iterator it
Combined button and popup list for selecting options.
typename QtPrivate::ArgResolver< Signal >::AllArgs ArgsType
typename std::iterator_traits< decltype( std::cbegin(std::declval< Container & >()))>::value_type ContainedType
Q_CORE_EXPORT QFuture< void > makeReadyVoidFuture()
static QFuture< std::decay_t< T > > makeReadyValueFuture(T &&value)
std::enable_if_t< QtPrivate::HasInputIterator< Container >::value, bool > if_container_with_input_iterators
static QFuture< T > makeExceptionalFuture(std::exception_ptr exception)
WhenAnyResult(qsizetype, const QFuture< T > &) -> WhenAnyResult< T >
static QFuture< ContainedType< Container > > makeReadyRangeFuture(Container &&container)
static QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
QFuture< OutputSequence > whenAllImpl(InputIt first, InputIt last)
std::is_convertible< typename std::iterator_traits< std::decay_t< decltype( std::begin(std::declval< Sequence >()))> >::iterator_category, std::random_access_iterator_tag > IsRandomAccessible
auto createTuple(Arg &&arg, Args &&... args)
std::bool_constant< isQFutureV< T > > isQFuture
std::enable_if_t< std::is_same_v< T, void > > EnableForVoid
void addCompletionHandlersImpl(const std::shared_ptr< ContextType > &context, const std::tuple< Ts... > &t)
constexpr bool isQFutureV
QFuture< QtFuture::WhenAnyResult< typename Future< ValueType >::type > > whenAnyImpl(InputIt first, InputIt last)
void watchContinuation(const QObject *context, Continuation &&c, QFutureInterfaceBase &fi)
void fulfillPromise(QPromise< T > &promise, QFuture< T > &future)
std::enable_if_t<!std::is_same_v< T, void > > EnableForNonVoid
QFuture< ValueType > makeReadyRangeFutureImpl(const QList< ValueType > &values)
constexpr bool IsPrivateSignalArg
auto cutTuple(Tuple &&t, std::index_sequence< I... >)
void Q_CORE_EXPORT watchContinuationImpl(const QObject *context, QtPrivate::QSlotObjectBase *slotObj, QFutureInterfaceBase &fi)
std::is_convertible< typename std::iterator_traits< Iterator >::iterator_category, std::forward_iterator_tag > IsForwardIterable
std::is_convertible< typename std::iterator_traits< std::decay_t< decltype( std::begin(std::declval< Sequence >()))> >::iterator_category, std::input_iterator_tag > HasInputIterator
void addCompletionHandlers(const std::shared_ptr< ContextType > &context, const std::tuple< Ts... > &t)
std::enable_if_t< QtPrivate::ArgResolver< Callable >::template CanInvokeWithArgs< Class, Callable > > EnableIfInvocable
std::conditional_t<(sizeof...(Args) > 0), std::invoke_result_t< decltype(createTuple< Arg, Args... >), Arg, Args... >, std::conditional_t< IsPrivateSignalArg< Arg >, void, Arg > > FilterLastPrivateSignalArg
std::bool_constant<(sizeof...(Args) > 0)> NotEmpty
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction function
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLenum GLsizei GLsizei GLint * values
[15]
GLenum GLuint GLintptr GLsizeiptr size
[1]
#define Q_ASSERT_X(cond, x, msg)
#define QT_DEPRECATED_VERSION_X(major, minor, text)
QFuture< void > future
[5]
std::false_type IsPromise
FilterLastPrivateSignalArg< std::decay_t< Arg >, std::decay_t< Args >... > AllArgs
FilterLastPrivateSignalArg< QPromise< Arg >, std::decay_t< Args >... > AllArgs
std::false_type IsPromise
void operator()(const QFutureInterfaceBase &parentData)
ContinuationWrapper(ContinuationWrapper &&other)=default
ContinuationWrapper & operator=(ContinuationWrapper &&)=default
ContinuationWrapper(Function &&f)
ContinuationWrapper(const ContinuationWrapper &other)
std::invoke_result_t< std::decay_t< F >, QFuture< Arg > > ResultType
std::invoke_result_t< std::decay_t< F >, std::decay_t< Arg > > ResultType
std::invoke_result_t< std::decay_t< F >, QFuture< void > > ResultType
std::invoke_result_t< std::decay_t< F > > ResultType
static auto unwrapImpl(T *outer)
QAtomicInteger< qsizetype > remaining
QPromise< ResultFutures > promise
WhenAllContext(qsizetype size)
void checkForCompletion(qsizetype index, T &&future)
typename ResultFutures::value_type ValueType
QPromise< ResultType > promise
void checkForCompletion(qsizetype, T &&result)