Skip to content

Commit

Permalink
Clarify docs regarding the states of a QFutureWatcher with no future set
Browse files Browse the repository at this point in the history
Task-number: QTBUG-55554
Change-Id: I49b475a95d8ee65864cfa6d1024cb17cfe648b43
Reviewed-by: Topi Reiniö <[email protected]>
  • Loading branch information
AndyShawQt authored and nierob committed Sep 24, 2018
1 parent 12c357b commit 8aa9bb6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/corelib/thread/qfuturewatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
{
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 8aa9bb6

Please sign in to comment.