Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QtFuture Namespace Reference

Classes

struct  WhenAnyResult
 

Typedefs

template<class Signal >
using ArgsType = typename QtPrivate::ArgResolver<Signal>::AllArgs
 
template<typename Container >
using if_container_with_input_iterators
 
template<typename Container >
using ContainedType
 

Enumerations

enum class  Launch { Sync , Async , Inherit }
 

Functions

template<typename OutputSequence , typename InputIt , typename ValueType = typename std::iterator_traits<InputIt>::value_type, std::enable_if_t< std::conjunction_v< QtPrivate::IsForwardIterable< InputIt >, QtPrivate::IsRandomAccessible< OutputSequence >, QtPrivate::isQFuture< ValueType > >, int > = 0>
QFuture< OutputSequence > whenAll (InputIt first, InputIt last)
 
template<typename InputIt , typename ValueType = typename std::iterator_traits<InputIt>::value_type, std::enable_if_t< std::conjunction_v< QtPrivate::IsForwardIterable< InputIt >, QtPrivate::isQFuture< ValueType > >, int > = 0>
QFuture< QList< ValueType > > whenAll (InputIt first, InputIt last)
 
template<typename OutputSequence , typename... Futures, std::enable_if_t< std::conjunction_v< QtPrivate::IsRandomAccessible< OutputSequence >, QtPrivate::NotEmpty< Futures... >, QtPrivate::isQFuture< std::decay_t< Futures > >... >, int > = 0>
QFuture< OutputSequence > whenAll (Futures &&... futures)
 
template<typename... Futures, std::enable_if_t< std::conjunction_v< QtPrivate::NotEmpty< Futures... >, QtPrivate::isQFuture< std::decay_t< Futures > >... >, int > = 0>
QFuture< QList< std::variant< std::decay_t< Futures >... > > > whenAll (Futures &&... futures)
 
template<typename InputIt , typename ValueType = typename std::iterator_traits<InputIt>::value_type, std::enable_if_t< std::conjunction_v< QtPrivate::IsForwardIterable< InputIt >, QtPrivate::isQFuture< ValueType > >, int > = 0>
QFuture< WhenAnyResult< typename QtPrivate::Future< ValueType >::type > > whenAny (InputIt first, InputIt last)
 
template<typename... Futures, std::enable_if_t< std::conjunction_v< QtPrivate::NotEmpty< Futures... >, QtPrivate::isQFuture< std::decay_t< Futures > >... >, int > = 0>
QFuture< std::variant< std::decay_t< Futures >... > > whenAny (Futures &&... futures)
 
template<class T >
 WhenAnyResult (qsizetype, const QFuture< T > &) -> WhenAnyResult< T >
 
template<class Sender , class Signal , typename = QtPrivate::EnableIfInvocable<Sender, Signal>>
static QFuture< ArgsType< Signal > > connect (Sender *sender, Signal signal)
 
template<typename Container , if_container_with_input_iterators< Container > = true>
static QFuture< ContainedType< Container > > makeReadyRangeFuture (Container &&container)
 
template<typename ValueType >
static QFuture< ValueType > makeReadyRangeFuture (std::initializer_list< ValueType > values)
 
template<typename T >
static QFuture< std::decay_t< T > > makeReadyValueFuture (T &&value)
 
Q_CORE_EXPORT QFuture< voidmakeReadyVoidFuture ()
 
template<typename T = void>
static QFuture< T > makeExceptionalFuture (std::exception_ptr exception)
 
template<typename T = void>
static QFuture< T > makeExceptionalFuture (const QException &exception)
 

Typedef Documentation

◆ ArgsType

template<class Signal >
using QtFuture::ArgsType = typename QtPrivate::ArgResolver<Signal>::AllArgs

Definition at line 906 of file qfuture_impl.h.

◆ ContainedType

template<typename Container >
using QtFuture::ContainedType
Initial value:
typename std::iterator_traits<decltype(
std::cbegin(std::declval<Container&>()))>::value_type

Definition at line 971 of file qfuture_impl.h.

◆ if_container_with_input_iterators

template<typename Container >
using QtFuture::if_container_with_input_iterators
Initial value:
std::enable_if_t<QtPrivate::HasInputIterator<Container>::value, bool>

Definition at line 967 of file qfuture_impl.h.

Enumeration Type Documentation

◆ Launch

enum class QtFuture::Launch
strong
Enumerator
Sync 
Async 
Inherit 

Definition at line 35 of file qfuture_impl.h.

Function Documentation

◆ connect()

template<class Sender , class Signal , typename = QtPrivate::EnableIfInvocable<Sender, Signal>>
static QFuture< ArgsType< Signal > > QtFuture::connect ( Sender * sender,
Signal signal )
static

Definition at line 909 of file qfuture_impl.h.

References QObject::connect(), QtPrivate::createTuple(), QObject::destroyed(), QObject::disconnect(), and signal.

Referenced by if().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ makeExceptionalFuture() [1/2]

template<typename T = void>
static QFuture< T > QtFuture::makeExceptionalFuture ( const QException & exception)
static

Definition at line 1041 of file qfuture_impl.h.

References QException::raise().

+ Here is the call graph for this function:

◆ makeExceptionalFuture() [2/2]

template<typename T = void>
static QFuture< T > QtFuture::makeExceptionalFuture ( std::exception_ptr exception)
static

Definition at line 1030 of file qfuture_impl.h.

◆ makeReadyRangeFuture() [1/2]

template<typename Container , if_container_with_input_iterators< Container > = true>
static QFuture< ContainedType< Container > > QtFuture::makeReadyRangeFuture ( Container && container)
static

Definition at line 976 of file qfuture_impl.h.

References QtPrivate::makeReadyRangeFutureImpl().

Referenced by if(), and requestPermissionsInternal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ makeReadyRangeFuture() [2/2]

template<typename ValueType >
static QFuture< ValueType > QtFuture::makeReadyRangeFuture ( std::initializer_list< ValueType > values)
static

Definition at line 990 of file qfuture_impl.h.

References QtPrivate::makeReadyRangeFutureImpl().

+ Here is the call graph for this function:

◆ makeReadyValueFuture()

template<typename T >
static QFuture< std::decay_t< T > > QtFuture::makeReadyValueFuture ( T && value)
static

Definition at line 996 of file qfuture_impl.h.

Referenced by if(), requestPermissionsInternal(), QtPrivate::whenAllImpl(), and QtPrivate::whenAnyImpl().

+ Here is the caller graph for this function:

◆ makeReadyVoidFuture()

QFuture< void > QtFuture::makeReadyVoidFuture ( )

Definition at line 948 of file qfutureinterface.cpp.

Referenced by if().

+ Here is the caller graph for this function:

◆ whenAll() [1/4]

template<typename OutputSequence , typename... Futures, std::enable_if_t< std::conjunction_v< QtPrivate::IsRandomAccessible< OutputSequence >, QtPrivate::NotEmpty< Futures... >, QtPrivate::isQFuture< std::decay_t< Futures > >... >, int > = 0>
QFuture< OutputSequence > QtFuture::whenAll ( Futures &&... futures)

Definition at line 475 of file qfuture.h.

References whenAll(), and QtPrivate::whenAllImpl().

+ Here is the call graph for this function:

◆ whenAll() [2/4]

template<typename... Futures, std::enable_if_t< std::conjunction_v< QtPrivate::NotEmpty< Futures... >, QtPrivate::isQFuture< std::decay_t< Futures > >... >, int > = 0>
QFuture< QList< std::variant< std::decay_t< Futures >... > > > QtFuture::whenAll ( Futures &&... futures)

Definition at line 484 of file qfuture.h.

References whenAll().

+ Here is the call graph for this function:

◆ whenAll() [3/4]

template<typename OutputSequence , typename InputIt , typename ValueType = typename std::iterator_traits<InputIt>::value_type, std::enable_if_t< std::conjunction_v< QtPrivate::IsForwardIterable< InputIt >, QtPrivate::IsRandomAccessible< OutputSequence >, QtPrivate::isQFuture< ValueType > >, int > = 0>
QFuture< OutputSequence > QtFuture::whenAll ( InputIt first,
InputIt last )

Definition at line 456 of file qfuture.h.

References whenAll().

Referenced by if(), whenAll(), and whenAll().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ whenAll() [4/4]

template<typename InputIt , typename ValueType = typename std::iterator_traits<InputIt>::value_type, std::enable_if_t< std::conjunction_v< QtPrivate::IsForwardIterable< InputIt >, QtPrivate::isQFuture< ValueType > >, int > = 0>
QFuture< QList< ValueType > > QtFuture::whenAll ( InputIt first,
InputIt last )

Definition at line 465 of file qfuture.h.

References whenAll().

+ Here is the call graph for this function:

◆ whenAny() [1/2]

template<typename... Futures, std::enable_if_t< std::conjunction_v< QtPrivate::NotEmpty< Futures... >, QtPrivate::isQFuture< std::decay_t< Futures > >... >, int > = 0>
QFuture< std::variant< std::decay_t< Futures >... > > QtFuture::whenAny ( Futures &&... futures)

Definition at line 504 of file qfuture.h.

References whenAny(), and QtPrivate::whenAnyImpl().

+ Here is the call graph for this function:

◆ whenAny() [2/2]

template<typename InputIt , typename ValueType = typename std::iterator_traits<InputIt>::value_type, std::enable_if_t< std::conjunction_v< QtPrivate::IsForwardIterable< InputIt >, QtPrivate::isQFuture< ValueType > >, int > = 0>
QFuture< WhenAnyResult< typename QtPrivate::Future< ValueType >::type > > QtFuture::whenAny ( InputIt first,
InputIt last )

Definition at line 494 of file qfuture.h.

References whenAny().

Referenced by if(), whenAny(), and whenAny().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WhenAnyResult()

template<class T >
QtFuture::WhenAnyResult ( qsizetype ,
const QFuture< T > &  ) -> WhenAnyResult< T >