diff options
Diffstat (limited to 'src/corelib/thread/qfutureinterface.h')
| -rw-r--r-- | src/corelib/thread/qfutureinterface.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/corelib/thread/qfutureinterface.h b/src/corelib/thread/qfutureinterface.h index c802be762b2..75c4cae0ca0 100644 --- a/src/corelib/thread/qfutureinterface.h +++ b/src/corelib/thread/qfutureinterface.h @@ -140,6 +140,7 @@ public: bool isThrottled() const; bool isResultReadyAt(int index) const; bool isValid() const; + int loadState() const; void cancel(); void setSuspended(bool suspend); @@ -151,6 +152,7 @@ public: bool waitForNextResult(); void waitForResult(int resultIndex); void waitForResume(); + void suspendIfRequested(); QMutex &mutex() const; QtPrivate::ExceptionStore &exceptionStore(); @@ -233,6 +235,7 @@ public: inline void reportResult(const T *result, int index = -1); inline void reportAndMoveResult(T &&result, int index = -1); + inline void reportResult(T &&result, int index = -1); inline void reportResult(const T &result, int index = -1); inline void reportResults(const QVector<T> &results, int beginIndex = -1, int count = -1); inline void reportFinished(const T *result); @@ -285,6 +288,12 @@ void QFutureInterface<T>::reportAndMoveResult(T &&result, int index) reportResultsReady(insertIndex, store.count()); } +template<typename T> +void QFutureInterface<T>::reportResult(T &&result, int index) +{ + reportAndMoveResult(std::move(result), index); +} + template <typename T> inline void QFutureInterface<T>::reportResult(const T &result, int index) { |
