Doc: Correct documentation of QFuture::cancel
Fixes: QTBUG-76305 Change-Id: I192a7f0bc2c15e532bc6d51c7e9c39561ae3436c Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
This commit is contained in:
parent
1ade5ea41a
commit
93642992ae
@ -138,10 +138,10 @@
|
|||||||
T is the same type as the return value of \a function. Non-void return
|
T is the same type as the return value of \a function. Non-void return
|
||||||
values can be accessed via the QFuture::result() function.
|
values can be accessed via the QFuture::result() function.
|
||||||
|
|
||||||
Note that the QFuture returned by QtConcurrent::run() does not support
|
\note The QFuture returned can only be used to query for the
|
||||||
canceling, pausing, or progress reporting. The QFuture returned can only
|
running/finished status and the return value of the function. In particular,
|
||||||
be used to query for the running/finished status and the return value of
|
canceling or pausing can be issued only if the computations behind the future
|
||||||
the function.
|
has not been started.
|
||||||
|
|
||||||
\sa {Concurrent Run}
|
\sa {Concurrent Run}
|
||||||
*/
|
*/
|
||||||
@ -157,10 +157,10 @@
|
|||||||
T is the same type as the return value of \a function. Non-void return
|
T is the same type as the return value of \a function. Non-void return
|
||||||
values can be accessed via the QFuture::result() function.
|
values can be accessed via the QFuture::result() function.
|
||||||
|
|
||||||
Note that the QFuture returned by QtConcurrent::run() does not support
|
\note The QFuture returned can only be used to query for the
|
||||||
canceling, pausing, or progress reporting. The QFuture returned can only
|
running/finished status and the return value of the function. In particular,
|
||||||
be used to query for the running/finished status and the return value of
|
canceling or pausing can be issued only if the computations behind the future
|
||||||
the function.
|
has not been started.
|
||||||
|
|
||||||
\sa {Concurrent Run}
|
\sa {Concurrent Run}
|
||||||
*/
|
*/
|
||||||
|
@ -55,8 +55,8 @@
|
|||||||
instance, the computation can be canceled with the cancel() function. To
|
instance, the computation can be canceled with the cancel() function. To
|
||||||
pause the computation, use the setPaused() function or one of the pause(),
|
pause the computation, use the setPaused() function or one of the pause(),
|
||||||
resume(), or togglePaused() convenience functions. Be aware that not all
|
resume(), or togglePaused() convenience functions. Be aware that not all
|
||||||
asynchronous computations can be canceled or paused. For example, the
|
running asynchronous computations can be canceled or paused. For example,
|
||||||
future returned by QtConcurrent::run() cannot be canceled; but the
|
the future returned by QtConcurrent::run() cannot be canceled; but the
|
||||||
future returned by QtConcurrent::mappedReduced() can.
|
future returned by QtConcurrent::mappedReduced() can.
|
||||||
|
|
||||||
Progress information is provided by the progressValue(),
|
Progress information is provided by the progressValue(),
|
||||||
@ -133,8 +133,8 @@
|
|||||||
Any QFutureWatcher object that is watching this future will not deliver
|
Any QFutureWatcher object that is watching this future will not deliver
|
||||||
progress and result ready signals on a canceled future.
|
progress and result ready signals on a canceled future.
|
||||||
|
|
||||||
Be aware that not all asynchronous computations can be canceled. For
|
Be aware that not all running asynchronous computations can be canceled.
|
||||||
example, the future returned by QtConcurrent::run() cannot be canceled;
|
For example, the future returned by QtConcurrent::run() cannot be canceled;
|
||||||
but the future returned by QtConcurrent::mappedReduced() can.
|
but the future returned by QtConcurrent::mappedReduced() can.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -84,8 +84,8 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
\snippet code/src_corelib_thread_qfuturewatcher.cpp 0
|
\snippet code/src_corelib_thread_qfuturewatcher.cpp 0
|
||||||
|
|
||||||
Be aware that not all asynchronous computations can be canceled or paused.
|
Be aware that not all running asynchronous computations can be canceled or
|
||||||
For example, the future returned by QtConcurrent::run() cannot be
|
paused. For example, the future returned by QtConcurrent::run() cannot be
|
||||||
canceled; but the future returned by QtConcurrent::mappedReduced() can.
|
canceled; but the future returned by QtConcurrent::mappedReduced() can.
|
||||||
|
|
||||||
QFutureWatcher<void> is specialized to not contain any of the result
|
QFutureWatcher<void> is specialized to not contain any of the result
|
||||||
@ -124,9 +124,9 @@ QFutureWatcherBase::QFutureWatcherBase(QObject *parent)
|
|||||||
progressRangeChanged(), progressTextChanged(), resultReadyAt(), and
|
progressRangeChanged(), progressTextChanged(), resultReadyAt(), and
|
||||||
resultsReadyAt() signals.
|
resultsReadyAt() signals.
|
||||||
|
|
||||||
Be aware that not all asynchronous computations can be canceled. For
|
Be aware that not all running asynchronous computations can be canceled.
|
||||||
example, the QFuture returned by QtConcurrent::run() cannot be canceled;
|
For example, the QFuture returned by QtConcurrent::run() cannot be
|
||||||
but the QFuture returned by QtConcurrent::mappedReduced() can.
|
canceled; but the QFuture returned by QtConcurrent::mappedReduced() can.
|
||||||
*/
|
*/
|
||||||
void QFutureWatcherBase::cancel()
|
void QFutureWatcherBase::cancel()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user