Threads: Fix mingw-gcc warning about 'cast to pointer from integer of different size'
Use reinterpret_cast to convert from DWORD to pointer. Change-Id: I17a12940850aeb0bc27080725a18eb93fee72ff7 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
parent
bb22f7cb84
commit
edfdaba696
@ -115,7 +115,7 @@ QThreadData *QThreadData::current()
|
||||
}
|
||||
threadData->deref();
|
||||
threadData->isAdopted = true;
|
||||
threadData->threadId = (Qt::HANDLE)GetCurrentThreadId();
|
||||
threadData->threadId = reinterpret_cast<Qt::HANDLE>(GetCurrentThreadId());
|
||||
|
||||
if (!QCoreApplicationPrivate::theMainThread) {
|
||||
QCoreApplicationPrivate::theMainThread = threadData->thread;
|
||||
@ -130,7 +130,7 @@ QThreadData *QThreadData::current()
|
||||
FALSE,
|
||||
DUPLICATE_SAME_ACCESS);
|
||||
#else
|
||||
realHandle = (HANDLE)GetCurrentThreadId();
|
||||
realHandle = reinterpret_cast<HANDLE>(GetCurrentThreadId());
|
||||
#endif
|
||||
qt_watch_adopted_thread(realHandle, threadData->thread);
|
||||
}
|
||||
@ -314,7 +314,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 = (Qt::HANDLE)GetCurrentThreadId();
|
||||
data->threadId = reinterpret_cast<Qt::HANDLE>(GetCurrentThreadId());
|
||||
|
||||
QThread::setTerminationEnabled(false);
|
||||
|
||||
@ -392,7 +392,7 @@ void QThreadPrivate::finish(void *arg, bool lockAnyway)
|
||||
|
||||
Qt::HANDLE QThread::currentThreadId() Q_DECL_NOTHROW
|
||||
{
|
||||
return (Qt::HANDLE)GetCurrentThreadId();
|
||||
return reinterpret_cast<Qt::HANDLE>(GetCurrentThreadId());
|
||||
}
|
||||
|
||||
int QThread::idealThreadCount() Q_DECL_NOTHROW
|
||||
|
Loading…
Reference in New Issue
Block a user