qthread_win.cpp: Fix compiler warnings by MSVC2015 (64bit).

thread\qthread_win.cpp(121): warning C4312: 'reinterpret_cast': conversion from 'DWORD' to 'Qt::HANDLE' of greater size
thread\qthread_win.cpp(343): warning C4312: 'reinterpret_cast': conversion from 'DWORD' to 'Qt::HANDLE' of greater size
thread\qthread_win.cpp(416): warning C4312: 'reinterpret_cast': conversion from 'DWORD' to 'Qt::HANDLE' of greater size

Change-Id: I5e60e4bb91a32491562748755d34a2c5a1e264b4
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Friedemann Kleint 2015-07-31 15:52:11 +02:00
parent 2f50102f85
commit e50629cc0d

View File

@ -118,7 +118,7 @@ QThreadData *QThreadData::current(bool createIfNecessary)
} }
threadData->deref(); threadData->deref();
threadData->isAdopted = true; threadData->isAdopted = true;
threadData->threadId = reinterpret_cast<Qt::HANDLE>(GetCurrentThreadId()); threadData->threadId = reinterpret_cast<Qt::HANDLE>(quintptr(GetCurrentThreadId()));
if (!QCoreApplicationPrivate::theMainThread) { if (!QCoreApplicationPrivate::theMainThread) {
QCoreApplicationPrivate::theMainThread = threadData->thread; QCoreApplicationPrivate::theMainThread = threadData->thread;
@ -340,7 +340,7 @@ unsigned int __stdcall QT_ENSURE_STACK_ALIGNED_FOR_SSE QThreadPrivate::start(voi
qt_create_tls(); qt_create_tls();
TlsSetValue(qt_current_thread_data_tls_index, data); 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); QThread::setTerminationEnabled(false);
@ -413,7 +413,7 @@ void QThreadPrivate::finish(void *arg, bool lockAnyway)
Qt::HANDLE QThread::currentThreadId() Q_DECL_NOTHROW 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 int QThread::idealThreadCount() Q_DECL_NOTHROW