summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@digia.com>2012-11-27 17:01:39 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-28 12:29:35 (GMT)
commitd1dfc461276ba53d870289b00a97d08df005e0b3 (patch)
tree0271ff9c42e4d6e32a9c1b6d2c372dee196c94e2 /src/corelib
parente2f600de9553168b3eb4fcbd1d4c523a91ee33ef (diff)
downloadQt-d1dfc461276ba53d870289b00a97d08df005e0b3.zip
Qt-d1dfc461276ba53d870289b00a97d08df005e0b3.tar.gz
Qt-d1dfc461276ba53d870289b00a97d08df005e0b3.tar.bz2
Document how to name threads.
Change-Id: Ia79f5dd4a55d5260032781eab2f74737d65729f2 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 2b818ff..cf129a6 100644
--- a/src/corelib/thread/qthread.cpp
+++ b/src/corelib/thread/qthread.cpp
@@ -251,6 +251,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