summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@digia.com>2012-11-27 17:51:31 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-28 16:21:57 +0100
commite2364e3df6016cbcb927dfb50892160dc678afb0 (patch)
tree269db023b3fb1ca2fb17160e7040a180fa15b6b3 /src/corelib
parent76b492050f5e6603064bf9208f91f53368a09d4a (diff)
Document how to name threads.
Change-Id: If7a7bf4f54509ebb86ce394d8bb5a7748ef419d5 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/thread/qthread.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp
index 465f2befbc..1265995d05 100644
--- a/src/corelib/thread/qthread.cpp
+++ b/src/corelib/thread/qthread.cpp
@@ -235,6 +235,14 @@ QThreadPrivate::~QThreadPrivate()
returns a platform specific ID for the thread; the latter returns
a QThread pointer.
+ To choose the name that your thread will be given (as identified
+ by the command \c{ps -L} on Linux, for example), you can call
+ \l{QObject::setObjectName()}{setObjectName()} before starting the thread.
+ If you don't call \l{QObject::setObjectName()}{setObjectName()},
+ the name given to your thread will be the class name of the runtime
+ type of your thread object (for example, \c "RenderThread" in the case of the
+ \l{Mandelbrot Example}, as that is the name of the QThread subclass).
+ Note that this is currently not available with release builds on Windows.
\section1 Subclassing QThread