diff options
Diffstat (limited to 'src/corelib/thread/qthread_win.cpp')
-rw-r--r-- | src/corelib/thread/qthread_win.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp index a4b853d62e..1a4b41fee4 100644 --- a/src/corelib/thread/qthread_win.cpp +++ b/src/corelib/thread/qthread_win.cpp @@ -32,7 +32,7 @@ ****************************************************************************/ //#define WINVER 0x0500 -#if !defined Q_OS_WINRT && (_WIN32_WINNT < 0x0400) +#if !defined(WINAPI_FAMILY) && (_WIN32_WINNT < 0x0400) #define _WIN32_WINNT 0x0400 #endif @@ -118,7 +118,7 @@ QThreadData *QThreadData::current(bool createIfNecessary) } threadData->deref(); threadData->isAdopted = true; - threadData->threadId = reinterpret_cast<Qt::HANDLE>(GetCurrentThreadId()); + threadData->threadId = reinterpret_cast<Qt::HANDLE>(quintptr(GetCurrentThreadId())); if (!QCoreApplicationPrivate::theMainThread) { QCoreApplicationPrivate::theMainThread = threadData->thread.load(); @@ -340,7 +340,7 @@ unsigned int __stdcall QT_ENSURE_STACK_ALIGNED_FOR_SSE QThreadPrivate::start(voi qt_create_tls(); TlsSetValue(qt_current_thread_data_tls_index, data); - data->threadId = reinterpret_cast<Qt::HANDLE>(GetCurrentThreadId()); + data->threadId = reinterpret_cast<Qt::HANDLE>(quintptr(GetCurrentThreadId())); QThread::setTerminationEnabled(false); @@ -413,7 +413,7 @@ void QThreadPrivate::finish(void *arg, bool lockAnyway) Qt::HANDLE QThread::currentThreadId() Q_DECL_NOTHROW { - return reinterpret_cast<Qt::HANDLE>(GetCurrentThreadId()); + return reinterpret_cast<Qt::HANDLE>(quintptr(GetCurrentThreadId())); } int QThread::idealThreadCount() Q_DECL_NOTHROW |