QtBase  v6.3.1
Public Member Functions | List of all members
QPromise< T > Class Template Reference

#include <qpromise.h>

Public Member Functions

 QPromise ()=default
 
 QPromise (QPromise< T > &&other)=default
 
 QPromise (const QFutureInterface< T > &other)
 
 QPromise (QFutureInterface< T > &&other) noexcept
 
 ~QPromise ()
 
QFuture< Tfuture () const
 
template<typename U , typename = QtPrivate::EnableIfSameOrConvertible<U, T>>
bool addResult (U &&result, int index=-1)
 
void setException (const QException &e)
 
void setException (const std::exception_ptr &e)
 
void start ()
 
void finish ()
 
void suspendIfRequested ()
 
bool isCanceled () const
 
void setProgressRange (int minimum, int maximum)
 
void setProgressValue (int progressValue)
 
void setProgressValueAndText (int progressValue, const QString &progressText)
 
void swap (QPromise< T > &other) noexcept
 

Detailed Description

template<typename T>
class QPromise< T >

Definition at line 60 of file qpromise.h.

Constructor & Destructor Documentation

◆ QPromise() [1/4]

template<typename T >
QPromise< T >::QPromise ( )
default

◆ QPromise() [2/4]

template<typename T >
QPromise< T >::QPromise ( QPromise< T > &&  other)
default

◆ QPromise() [3/4]

template<typename T >
QPromise< T >::QPromise ( const QFutureInterface< T > &  other)
inline

Definition at line 69 of file qpromise.h.

◆ QPromise() [4/4]

template<typename T >
QPromise< T >::QPromise ( QFutureInterface< T > &&  other)
inlinenoexcept

Definition at line 70 of file qpromise.h.

◆ ~QPromise()

template<typename T >
QPromise< T >::~QPromise ( )
inline

Definition at line 72 of file qpromise.h.

Member Function Documentation

◆ addResult()

template<typename T >
template<typename U , typename = QtPrivate::EnableIfSameOrConvertible<U, T>>
bool QPromise< T >::addResult ( U &&  result,
int  index = -1 
)
inline

Definition at line 85 of file qpromise.h.

Here is the caller graph for this function:

◆ finish()

template<typename T >
void QPromise< T >::finish ( )
inline

Definition at line 98 of file qpromise.h.

Here is the caller graph for this function:

◆ future()

template<typename T >
QFuture<T> QPromise< T >::future ( ) const
inline

Definition at line 83 of file qpromise.h.

Here is the caller graph for this function:

◆ isCanceled()

template<typename T >
bool QPromise< T >::isCanceled ( ) const
inline

Definition at line 102 of file qpromise.h.

Here is the caller graph for this function:

◆ setException() [1/2]

template<typename T >
void QPromise< T >::setException ( const QException e)
inline

Definition at line 90 of file qpromise.h.

◆ setException() [2/2]

template<typename T >
void QPromise< T >::setException ( const std::exception_ptr &  e)
inline

Definition at line 94 of file qpromise.h.

◆ setProgressRange()

template<typename T >
void QPromise< T >::setProgressRange ( int  minimum,
int  maximum 
)
inline

Definition at line 105 of file qpromise.h.

Here is the caller graph for this function:

◆ setProgressValue()

template<typename T >
void QPromise< T >::setProgressValue ( int  progressValue)
inline

Definition at line 106 of file qpromise.h.

Here is the caller graph for this function:

◆ setProgressValueAndText()

template<typename T >
void QPromise< T >::setProgressValueAndText ( int  progressValue,
const QString progressText 
)
inline

Definition at line 107 of file qpromise.h.

◆ start()

template<typename T >
void QPromise< T >::start ( )
inline

Definition at line 97 of file qpromise.h.

Here is the caller graph for this function:

◆ suspendIfRequested()

template<typename T >
void QPromise< T >::suspendIfRequested ( )
inline

Definition at line 100 of file qpromise.h.

Here is the caller graph for this function:

◆ swap()

template<typename T >
void QPromise< T >::swap ( QPromise< T > &  other)
inlinenoexcept

Definition at line 112 of file qpromise.h.

Here is the call graph for this function:

The documentation for this class was generated from the following files: