diff options
author | Andy Shaw <andy.shaw@qt.io> | 2018-09-15 01:06:11 +0200 |
---|---|---|
committer | Jędrzej Nowacki <jedrzej.nowacki@qt.io> | 2018-09-24 10:32:49 +0000 |
commit | 8aa9bb6d3fcb45579f3dc45c5bdef6d33a9f9d24 (patch) | |
tree | 9bc6cbffc65cd048321e1b9bf7a8d4551a0017a7 | |
parent | 12c357bebb19407ee8e034f3679b6c8b77ece9c1 (diff) |
Clarify docs regarding the states of a QFutureWatcher with no future set
Task-number: QTBUG-55554
Change-Id: I49b475a95d8ee65864cfa6d1024cb17cfe648b43
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
-rw-r--r-- | src/corelib/thread/qfuturewatcher.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/corelib/thread/qfuturewatcher.cpp b/src/corelib/thread/qfuturewatcher.cpp index 5b68af1fbc..faeb6b3a28 100644 --- a/src/corelib/thread/qfuturewatcher.cpp +++ b/src/corelib/thread/qfuturewatcher.cpp @@ -98,7 +98,9 @@ QT_BEGIN_NAMESPACE /*! \fn template <typename T> QFutureWatcher<T>::QFutureWatcher(QObject *parent) - Constructs a new QFutureWatcher with the given \a parent. + Constructs a new QFutureWatcher with the given \a parent. Until a future is + set with setFuture(), the functions isStarted(), isCanceled(), and + isFinished() return \c true. */ QFutureWatcherBase::QFutureWatcherBase(QObject *parent) :QObject(*new QFutureWatcherBasePrivate, parent) @@ -241,7 +243,7 @@ QString QFutureWatcherBase::progressText() const /*! \fn template <typename T> bool QFutureWatcher<T>::isStarted() const Returns \c true if the asynchronous computation represented by the future() - has been started; otherwise returns \c false. + has been started, or if no future has been set; otherwise returns \c false. */ bool QFutureWatcherBase::isStarted() const { @@ -272,7 +274,7 @@ bool QFutureWatcherBase::isRunning() const /*! \fn template <typename T> bool QFutureWatcher<T>::isCanceled() const Returns \c true if the asynchronous computation has been canceled with the - cancel() function; otherwise returns \c false. + cancel() function, or if no future has been set; otherwise returns \c false. Be aware that the computation may still be running even though this function returns \c true. See cancel() for more details. |