diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/concurrent/qtconcurrentrun.cpp | 17 | ||||
-rw-r--r-- | src/concurrent/qtconcurrentrun.h | 6 | ||||
-rw-r--r-- | src/corelib/thread/qpromise.qdoc | 4 |
3 files changed, 11 insertions, 16 deletions
diff --git a/src/concurrent/qtconcurrentrun.cpp b/src/concurrent/qtconcurrentrun.cpp index 18bcf332ac5..143b9bb6f29 100644 --- a/src/concurrent/qtconcurrentrun.cpp +++ b/src/concurrent/qtconcurrentrun.cpp @@ -167,18 +167,17 @@ \section2 The mandatory QPromise argument - The function passed to QtConcurrent::run() in \e {Run With Promise} mode is expected - to have an additional argument of \c {QPromise<T> &} type, where - T is the type of the computation result (it should match the type T - of QFuture<T> returned by the QtConcurrent::runWithPromise()), like e.g.: + The function passed to QtConcurrent::run() in \e {Run With Promise} mode + is expected to have an additional argument of \c {QPromise<T> &} type, where + \c T is the type of the computation result (it should match the type \c T + of QFuture<T> returned by QtConcurrent::run()), like e.g.: \snippet code/src_concurrent_qtconcurrentrun.cpp 9 - The \c promise argument is instantiated inside the - QtConcurrent::run() function, and its reference - is passed to the invoked \c aFunction, so the user - doesn't need to instantiate it by himself, nor pass it explicitly - when calling QtConcurrent::runWithPromise(). + The \c promise argument is instantiated inside the QtConcurrent::run() + function, and its reference is passed to the invoked \c aFunction, so the + user doesn't need to instantiate it, nor pass it explicitly + when calling QtConcurrent::run() in this mode. The additional argument of QPromise type always needs to appear as a first argument on function's arguments list, like: diff --git a/src/concurrent/qtconcurrentrun.h b/src/concurrent/qtconcurrentrun.h index 4ce8d6ae05e..b3790be2e36 100644 --- a/src/concurrent/qtconcurrentrun.h +++ b/src/concurrent/qtconcurrentrun.h @@ -61,12 +61,6 @@ namespace QtConcurrent { template <typename T> QFuture<T> run(QThreadPool *pool, Function function, ...); - template <typename T> - QFuture<T> runWithPromise(Function function, ...); - - template <typename T> - QFuture<T> runWithPromise(QThreadPool *pool, Function function, ...); - } // namespace QtConcurrent #else diff --git a/src/corelib/thread/qpromise.qdoc b/src/corelib/thread/qpromise.qdoc index f9040d4cd10..a462135d96c 100644 --- a/src/corelib/thread/qpromise.qdoc +++ b/src/corelib/thread/qpromise.qdoc @@ -83,7 +83,9 @@ \internal Constructs a QPromise with a passed QFutureInterface \a other. - Used internally for QtConcurrent::runWithPromise. + Used internally for QtConcurrent::run(), when its callable takes + a reference to the associated promise as its first argument + (run with promise mode). \sa operator=() */ |