diff options
author | Sze Howe Koh <szehowe.koh@gmail.com> | 2013-12-29 08:45:45 +0800 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-30 13:55:51 +0100 |
commit | d9b7d60df02178c640fb0a5c609cedad95c5c009 (patch) | |
tree | 6087dbba7d4cc77b74100b83455809ed37f4c25d /src/corelib/global/qnamespace.qdoc | |
parent | fe4ebf12696a8e438fa6609552774d1becb14c25 (diff) |
Doc: Polish Qt::ConnectionType descriptions
- Shorten Qt::AutoConnection description, rearrange to match the order
of the subsequent rows.
- Note the thread used in Qt::DirectConnection
- "Emitter's thread" is ambiguous -- a signal is not necessarily
emitted from the thread that the emitter lives in.
- Misusing Qt::BlockingQueuedConnection WILL (not "can") cause a
deadlock. Qt even issues an error message before it freezes.
- Remove the \note command -- it breaks the table and displays the note
in a new paragraph.
Change-Id: Ib60cb665e0cd23e1e072402ec5d8be344b8454f7
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/corelib/global/qnamespace.qdoc')
-rw-r--r-- | src/corelib/global/qnamespace.qdoc | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 90f38fd51c..ae377e124b 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -509,15 +509,14 @@ delivery at a later time. \value AutoConnection - (default) If the signal is emitted from a different thread than the - receiving object, the signal is queued, behaving as - Qt::QueuedConnection. Otherwise, the slot is invoked directly, - behaving as Qt::DirectConnection. The type of connection is + \b (Default) If the receiver \l{QObject#Thread Affinity}{lives in} the + thread that emits the signal, Qt::DirectConnection is used. Otherwise, + Qt::QueuedConnection is used. The connection type is determined when the signal is emitted. \value DirectConnection - The slot is invoked immediately, when the signal is - emitted. + The slot is invoked immediately when the signal is + emitted. The slot is executed in the signalling thread. \value QueuedConnection The slot is invoked when control returns to the event loop @@ -525,11 +524,10 @@ receiver's thread. \value BlockingQueuedConnection - Same as QueuedConnection, except the current thread blocks - until the slot returns. This connection type should only be - used where the emitter and receiver are in different - threads. \note Violating this rule can cause your - application to deadlock. + Same as Qt::QueuedConnection, except that the signalling thread blocks + until the slot returns. This connection must \e not be used if the + receiver lives in the signalling thread, or else the application + will deadlock. \value UniqueConnection This is a flag that can be combined with any one of the above |