QtCore/qfuturesynchronizer.h Source File
Go to the documentation of this file.
42 #ifndef QFUTRUESYNCHRONIZER_H
43 #define QFUTRUESYNCHRONIZER_H
47 #ifndef QT_NO_CONCURRENT
57 Q_DISABLE_COPY(QFutureSynchronizer)
62 : m_cancelOnWait(false)
63 { addFuture(future); }
75 m_futures.append(future);
81 for (
int i = 0; i < m_futures.count(); ++i) {
82 m_futures[i].cancel();
86 for (
int i = 0; i < m_futures.count(); ++i) {
87 m_futures[i].waitForFinished();
103 m_cancelOnWait = enabled;
108 return m_cancelOnWait;
119 #endif // QT_NO_CONCURRENT
121 #endif // QFUTRUESYNCHRONIZER_H
void addFuture(const QFuture< T > &future)
QList< QFuture< T > > futures() const
#define QT_BEGIN_NAMESPACE
void setFuture(const QFuture< T > &future)
QFutureSynchronizer(const QFuture< T > &future)
bool cancelOnWait() const
void setCancelOnWait(bool enabled)
QList< QFuture< T > > m_futures