summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2022-02-11 17:03:51 +0100
committerSona Kurazyan <sona.kurazyan@qt.io>2022-02-11 22:02:35 +0100
commit407d076124d42a1f4911e139ffb2d77a117ef277 (patch)
tree401d71e6753bdb89c1306e8d6339db6bb2d7ea8c /src
parent815bc61626825ec5572d642e6baaec9158d81044 (diff)
Remove mentions of QtConcurrent::runWithPromise from docs
cf043a785ac9357e8f1283ea9e1496261af2b1a5 unified QtConcurrent::run() and QtConcurrent::runWithPromise(). Remove the last mentions of runWithPromise. Also did some minor cosmetic improvements. Pick-to: 6.3 Change-Id: Ie3b39600978ccfa4a009d3ff68567a348dc7b166 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/concurrent/qtconcurrentrun.cpp17
-rw-r--r--src/concurrent/qtconcurrentrun.h6
-rw-r--r--src/corelib/thread/qpromise.qdoc4
3 files changed, 11 insertions, 16 deletions
diff --git a/src/concurrent/qtconcurrentrun.cpp b/src/concurrent/qtconcurrentrun.cpp
index 18bcf332ac..143b9bb6f2 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 4ce8d6ae05..b3790be2e3 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 f9040d4cd1..a462135d96 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=()
*/