summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qobject_p.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-08-15 18:03:50 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-15 23:40:57 +0200
commit3ef51efbe75bfb9f1dfbe7df073e9eb745a72ad8 (patch)
tree0778012c6ea10341eba46b0f30b22b95b73fa207 /src/corelib/kernel/qobject_p.h
parent03b95247a1bef127e3de7a00778f52a37009edf0 (diff)
Avoid an expensive call to toLocal8Bit upon thread creation
QString::toLocal8Bit() will need to call QTextCodec::codecForLocale(), which isn't the cheapest of the functions, at least the first time it's run. So avoid calling it when in most scenarios, the name of the QObject isn't set, and the information is purely for debugging. Additionally, avoid allocating memory when setting the thread name to the class name. The class name coming from the meta object is a static constant string and we can use it directly. Change-Id: Ief643bad87a51487b1d41c0a2f323e80bb53e8a7 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Diffstat (limited to 'src/corelib/kernel/qobject_p.h')
0 files changed, 0 insertions, 0 deletions