summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthread_win.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-01-20 18:16:08 +0100
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-01-20 18:18:59 +0100
commit9033977d3971db5352a2bb51052a723a2ac57a8f (patch)
treed1a70bdf5e892cc391f7bbfd61ff5611fe25ce3d /src/corelib/thread/qthread_win.cpp
parente5e43a2386fb4a4c2cb90d5a8d9bb5ca81a2675e (diff)
parent03b6a2f0f98b70b24c0cce645d6d58c084111f91 (diff)
Merge remote-tracking branch 'origin/stable' into dev
Conflicts: src/corelib/global/qglobal.h src/corelib/tools/qstring.cpp src/gui/image/image.pri src/gui/image/qimage.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/eglfs/qeglfshooks_stub.cpp tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp Change-Id: I3b9ba029c8f2263b011f204fdf68c3231c6d4ce5
Diffstat (limited to 'src/corelib/thread/qthread_win.cpp')
-rw-r--r--src/corelib/thread/qthread_win.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index 2c3ff879e4..03c5b943d6 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -141,11 +141,11 @@ void QThreadData::clearCurrentThreadData()
TlsSetValue(qt_current_thread_data_tls_index, 0);
}
-QThreadData *QThreadData::current()
+QThreadData *QThreadData::current(bool createIfNecessary)
{
qt_create_tls();
QThreadData *threadData = reinterpret_cast<QThreadData *>(TlsGetValue(qt_current_thread_data_tls_index));
- if (!threadData) {
+ if (!threadData && createIfNecessary) {
threadData = new QThreadData;
// This needs to be called prior to new AdoptedThread() to
// avoid recursion.