Obsolete Members for QFuture
The following members of class QFuture are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.
Public Functions
(obsolete) bool | isPaused() const |
(obsolete) void | pause() |
(obsolete) void | setPaused(bool paused) |
(obsolete) void | togglePaused() |
Member Function Documentation
bool QFuture::isPaused() const
This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
Use isSuspending() or isSuspended() instead.
Returns true
if the asynchronous computation has been paused with the pause() function; otherwise returns false
.
Be aware that the computation may still be running even though this function returns true
. See setPaused() for more details. To check if pause actually took effect, use isSuspended() instead.
See also setPaused(), togglePaused(), and isSuspended().
void QFuture::pause()
This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
Use suspend() instead.
Pauses the asynchronous computation represented by this future. This is a convenience method that simply calls setPaused(true).
See also resume().
void QFuture::setPaused(bool paused)
This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
Use setSuspended() instead.
If paused is true, this function pauses the asynchronous computation represented by the future. If the computation is already paused, this function does nothing. Any QFutureWatcher object that is watching this future will stop delivering progress and result ready signals while the future is paused. Signal delivery will continue once the future is resumed.
If paused is false, this function resumes the asynchronous computation. If the computation was not previously paused, this function does nothing.
Be aware that not all computations can be paused. For example, the future returned by QtConcurrent::run() cannot be paused; but the future returned by QtConcurrent::mappedReduced() can.
See also isPaused(), pause(), resume(), and togglePaused().
void QFuture::togglePaused()
This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
Use toggleSuspended() instead.
Toggles the paused state of the asynchronous computation. In other words, if the computation is currently paused, calling this function resumes it; if the computation is running, it is paused. This is a convenience method for calling setPaused(!isPaused()).
© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.