diff options
Diffstat (limited to 'src/corelib/thread/qthread_win.cpp')
-rw-r--r-- | src/corelib/thread/qthread_win.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp index 4459ae87af..83bcb7d751 100644 --- a/src/corelib/thread/qthread_win.cpp +++ b/src/corelib/thread/qthread_win.cpp @@ -61,9 +61,10 @@ # include <process.h> #endif // Q_OS_WINRT -#ifndef QT_NO_THREAD QT_BEGIN_NAMESPACE +#ifndef QT_NO_THREAD + #ifdef Q_OS_WINRT inline DWORD qWinRTTlsAlloc() { return FlsAlloc(0); @@ -359,13 +360,7 @@ unsigned int __stdcall QT_ENSURE_STACK_ALIGNED_FOR_SSE QThreadPrivate::start(voi data->quitNow = thr->d_func()->exited; } - QAbstractEventDispatcher *eventDispatcher = data->eventDispatcher.load(); - if (!eventDispatcher) { - eventDispatcher = createEventDispatcher(data); - data->eventDispatcher.storeRelease(eventDispatcher); - } - - eventDispatcher->startingUp(); + data->ensureEventDispatcher(); #if !defined(QT_NO_DEBUG) && defined(Q_CC_MSVC) && !defined(Q_OS_WINRT) // sets the name of the current thread. @@ -449,6 +444,8 @@ void QThread::yieldCurrentThread() #endif } +#endif // QT_NO_THREAD + void QThread::sleep(unsigned long secs) { ::Sleep(secs * 1000); @@ -464,6 +461,8 @@ void QThread::usleep(unsigned long usecs) ::Sleep((usecs / 1000) + 1); } +#ifndef QT_NO_THREAD + void QThread::start(Priority priority) { Q_D(QThread); @@ -700,5 +699,6 @@ void QThreadPrivate::setPriority(QThread::Priority threadPriority) } } -QT_END_NAMESPACE #endif // QT_NO_THREAD + +QT_END_NAMESPACE |