42 #ifndef QFUTRUESYNCHRONIZER_H 43 #define QFUTRUESYNCHRONIZER_H 45 #include <QtCore/qfuture.h> 47 #ifndef QT_NO_CONCURRENT 119 #endif // QT_NO_CONCURRENT 121 #endif // QFUTRUESYNCHRONIZER_H QFutureSynchronizer()
Constructs a QFutureSynchronizer.
#define QT_END_NAMESPACE
This macro expands to.
void addFuture(const QFuture< T > &future)
Adds future to the list of managed futures.
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
int count(const T &t) const
Returns the number of occurrences of value in the list.
void waitForFinished()
Waits for all futures to finish.
The QFutureSynchronizer class is a convenience class that simplifies QFuture synchronization.
void setFuture(const QFuture< T > &future)
Sets future to be the only future managed by this QFutureSynchronizer.
void append(const T &t)
Inserts value at the end of the list.
#define QT_BEGIN_NAMESPACE
This macro expands to.
bool cancelOnWait() const
Returns true if the cancel-on-wait feature is enabled; otherwise returns false.
QList< QFuture< T > > futures() const
Returns a list of all managed futures.
void clear()
Removes all items from the list.
void clearFutures()
Removes all managed futures from this QFutureSynchronizer.
The QFuture class represents the result of an asynchronous computation.
QList< QFuture< T > > m_futures
void setCancelOnWait(bool enabled)
Enables or disables the cancel-on-wait feature based on the enabled argument.
~QFutureSynchronizer()
Calls waitForFinished() function to ensure that all futures have finished before destroying this QFut...
QFutureSynchronizer(const QFuture< T > &future)
Constructs a QFutureSynchronizer and begins watching future by calling addFuture().
The QList class is a template class that provides lists.