diff --git a/src/concurrent/qtconcurrentfilter.h b/src/concurrent/qtconcurrentfilter.h index a85cbc0224..8a17487466 100644 --- a/src/concurrent/qtconcurrentfilter.h +++ b/src/concurrent/qtconcurrentfilter.h @@ -365,7 +365,7 @@ ResultType blockingFilteredReduced(QThreadPool *pool, { QFuture future = startFilteredReduced( pool, std::forward(sequence), keep, reduce, options); - return future.result(); + return future.takeResult(); } template @@ -377,7 +377,7 @@ ResultType blockingFilteredReduced(Sequence &&sequence, { QFuture future = startFilteredReduced( QThreadPool::globalInstance(), std::forward(sequence), keep, reduce, options); - return future.result(); + return future.takeResult(); } template future = startFilteredReduced( pool, std::forward(sequence), keep, reduce, ResultType(std::forward(initialValue)), options); - return future.result(); + return future.takeResult(); } template future = startFilteredReduced( QThreadPool::globalInstance(), std::forward(sequence), keep, reduce, ResultType(std::forward(initialValue)), options); - return future.result(); + return future.takeResult(); } #ifndef Q_CLANG_QDOC @@ -425,7 +425,7 @@ ResultType blockingFilteredReduced(QThreadPool *pool, { QFuture future = startFilteredReduced( pool, std::forward(sequence), keep, reduce, options); - return future.result(); + return future.takeResult(); } template future = startFilteredReduced( QThreadPool::globalInstance(), std::forward(sequence), keep, reduce, options); - return future.result(); + return future.takeResult(); } template future = startFilteredReduced( pool, std::forward(sequence), keep, reduce, ResultType(std::forward(initialValue)), options); - return future.result(); + return future.takeResult(); } template future = startFilteredReduced( QThreadPool::globalInstance(), std::forward(sequence), keep, reduce, ResultType(std::forward(initialValue)), options); - return future.result(); + return future.takeResult(); } #endif @@ -489,7 +489,7 @@ ResultType blockingFilteredReduced(QThreadPool *pool, { QFuture future = startFilteredReduced(pool, begin, end, keep, reduce, options); - return future.result(); + return future.takeResult(); } template @@ -502,7 +502,7 @@ ResultType blockingFilteredReduced(Iterator begin, { QFuture future = startFilteredReduced(QThreadPool::globalInstance(), begin, end, keep, reduce, options); - return future.result(); + return future.takeResult(); } template future = startFilteredReduced(pool, begin, end, keep, reduce, ResultType(std::forward(initialValue)), options); - return future.result(); + return future.takeResult(); } template future = startFilteredReduced(QThreadPool::globalInstance(), begin, end, keep, reduce, ResultType(std::forward(initialValue)), options); - return future.result(); + return future.takeResult(); } #ifndef Q_CLANG_QDOC @@ -551,7 +551,7 @@ ResultType blockingFilteredReduced(QThreadPool *pool, { QFuture future = startFilteredReduced(pool, begin, end, keep, reduce, options); - return future.result(); + return future.takeResult(); } template future = startFilteredReduced(QThreadPool::globalInstance(), begin, end, keep, reduce, options); - return future.result(); + return future.takeResult(); } template future = startFilteredReduced(pool, begin, end, keep, reduce, ResultType(std::forward(initialValue)), options); - return future.result(); + return future.takeResult(); } template future = startFilteredReduced(QThreadPool::globalInstance(), begin, end, keep, reduce, ResultType(std::forward(initialValue)), options); - return future.result(); + return future.takeResult(); } #endif diff --git a/src/concurrent/qtconcurrentmap.h b/src/concurrent/qtconcurrentmap.h index e7c188fb8c..2b475dced1 100644 --- a/src/concurrent/qtconcurrentmap.h +++ b/src/concurrent/qtconcurrentmap.h @@ -399,7 +399,7 @@ ResultType blockingMappedReduced(QThreadPool *pool, QFuture future = QtConcurrent::startMappedReduced , ResultType> (pool, std::forward(sequence), map, reduce, options); - return future.result(); + return future.takeResult(); } template @@ -412,7 +412,7 @@ ResultType blockingMappedReduced(Sequence &&sequence, QFuture future = QtConcurrent::startMappedReduced , ResultType> (QThreadPool::globalInstance(), std::forward(sequence), map, reduce, options); - return future.result(); + return future.takeResult(); } template , ResultType> (pool, std::forward(sequence), map, reduce, ResultType(std::forward(initialValue)), options); - return future.result(); + return future.takeResult(); } template , ResultType> (QThreadPool::globalInstance(), std::forward(sequence), map, reduce, ResultType(std::forward(initialValue)), options); - return future.result(); + return future.takeResult(); } template future = QtConcurrent::startMappedReduced , ResultType> (pool, std::forward(sequence), map, reduce, options); - return future.result(); + return future.takeResult(); } template future = QtConcurrent::startMappedReduced , ResultType> (QThreadPool::globalInstance(), std::forward(sequence), map, reduce, options); - return future.result(); + return future.takeResult(); } template , ResultType> (pool, std::forward(sequence), map, reduce, ResultType(std::forward(initialValue)), options); - return future.result(); + return future.takeResult(); } template , ResultType> (QThreadPool::globalInstance(), std::forward(sequence), map, reduce, ResultType(std::forward(initialValue)), options); - return future.result(); + return future.takeResult(); } // blockingMappedReduced() for iterator ranges @@ -529,7 +529,7 @@ ResultType blockingMappedReduced(QThreadPool *pool, QFuture future = QtConcurrent::startMappedReduced , ResultType> (pool, begin, end, map, reduce, options); - return future.result(); + return future.takeResult(); } template @@ -543,7 +543,7 @@ ResultType blockingMappedReduced(Iterator begin, QFuture future = QtConcurrent::startMappedReduced , ResultType> (QThreadPool::globalInstance(), begin, end, map, reduce, options); - return future.result(); + return future.takeResult(); } template , ResultType> (pool, begin, end, map, reduce, ResultType(std::forward(initialValue)), options); - return future.result(); + return future.takeResult(); } template , ResultType> (QThreadPool::globalInstance(), begin, end, map, reduce, ResultType(std::forward(initialValue)), options); - return future.result(); + return future.takeResult(); } template future = QtConcurrent::startMappedReduced , ResultType> (pool, begin, end, map, reduce, options); - return future.result(); + return future.takeResult(); } template future = QtConcurrent::startMappedReduced , ResultType> (QThreadPool::globalInstance(), begin, end, map, reduce, options); - return future.result(); + return future.takeResult(); } template , ResultType> (pool, begin, end, map, reduce, ResultType(std::forward(initialValue)), options); - return future.result(); + return future.takeResult(); } template , ResultType> (QThreadPool::globalInstance(), begin, end, map, reduce, ResultType(std::forward(initialValue)), options); - return future.result(); + return future.takeResult(); } // mapped() for sequences with a different putput sequence type.