From c4fa3331a4429f83581137315a374836e2b8c594 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 24 Feb 2010 10:05:22 +0100 Subject: Doc: QFutureWatcher: specify that calls to setFuture should happen after the connections Reviewed-by: Morten Sorvig --- src/corelib/concurrent/qfuturewatcher.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/corelib/concurrent/qfuturewatcher.cpp b/src/corelib/concurrent/qfuturewatcher.cpp index 3065205..2213725 100644 --- a/src/corelib/concurrent/qfuturewatcher.cpp +++ b/src/corelib/concurrent/qfuturewatcher.cpp @@ -499,6 +499,12 @@ void QFutureWatcherBasePrivate::sendCallOutEvent(QFutureCallOutEvent *event) /*! \fn void QFutureWatcher::setFuture(const QFuture &future) Starts watching the given \a future. + + One of the signal might be emit for the current state of the \a future. + (For example, if the future is already stopped, the finished signal will be emit) + + To avoid race condition, it is important to call this function after doing + the connections. */ /*! \fn QFuture QFutureWatcher::future() const -- cgit v0.12 From 38d5ab158a4d1b68fb64149b83ac169701d63403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Wed, 24 Feb 2010 11:44:37 +0100 Subject: Fix grammar. Reviewed-by: Kim --- src/corelib/concurrent/qfuturewatcher.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/corelib/concurrent/qfuturewatcher.cpp b/src/corelib/concurrent/qfuturewatcher.cpp index 2213725..f3375e1 100644 --- a/src/corelib/concurrent/qfuturewatcher.cpp +++ b/src/corelib/concurrent/qfuturewatcher.cpp @@ -500,8 +500,9 @@ void QFutureWatcherBasePrivate::sendCallOutEvent(QFutureCallOutEvent *event) Starts watching the given \a future. - One of the signal might be emit for the current state of the \a future. - (For example, if the future is already stopped, the finished signal will be emit) + One of the signals might be emitted for the current state of the + \a future. For example, if the future is already stopped, the + finished signal will be emitted. To avoid race condition, it is important to call this function after doing the connections. -- cgit v0.12 From fb7fc9ee85c47446b0fb4d11789949784fbf853c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Wed, 24 Feb 2010 11:47:23 +0100 Subject: More pedantry. Reviewed-by: Kim --- src/corelib/concurrent/qfuturewatcher.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/concurrent/qfuturewatcher.cpp b/src/corelib/concurrent/qfuturewatcher.cpp index f3375e1..3b808b8 100644 --- a/src/corelib/concurrent/qfuturewatcher.cpp +++ b/src/corelib/concurrent/qfuturewatcher.cpp @@ -504,8 +504,8 @@ void QFutureWatcherBasePrivate::sendCallOutEvent(QFutureCallOutEvent *event) \a future. For example, if the future is already stopped, the finished signal will be emitted. - To avoid race condition, it is important to call this function after doing - the connections. + To avoid a race condition, it is important to call this function + \i after doing the connections. */ /*! \fn QFuture QFutureWatcher::future() const -- cgit v0.12