From 3f61873f497286af1bce97883f30bf9a520e6a75 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Fri, 26 Oct 2018 15:32:50 +0000 Subject: Correctly document value of QThread::currentThreadId on Windows The implementation calls GetCurrentThreadId, not GetCurrentThread, so the return value is not the pseudo-handle. Task-number: QTBUG-67686 Change-Id: Ifde0cf603dcea01bc1c454a8bebe1e5c0f22617f Reviewed-by: Paul Wicking Reviewed-by: Thiago Macieira --- src/corelib/thread/qthread.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp index d2d6435004..d3f60eea4f 100644 --- a/src/corelib/thread/qthread.cpp +++ b/src/corelib/thread/qthread.cpp @@ -298,12 +298,9 @@ QThreadPrivate::~QThreadPrivate() \warning The handle returned by this function is used for internal purposes and should not be used in any application code. - \warning On Windows, the returned value is a pseudo-handle for the - current thread. It can't be used for numerical comparison. i.e., - this function returns the DWORD (Windows-Thread ID) returned by - the Win32 function getCurrentThreadId(), not the HANDLE - (Windows-Thread HANDLE) returned by the Win32 function - getCurrentThread(). + \note On Windows, this function returns the DWORD (Windows-Thread + ID) returned by the Win32 function GetCurrentThreadId(), not the pseudo-HANDLE + (Windows-Thread HANDLE) returned by the Win32 function GetCurrentThread(). */ /*! -- cgit v1.2.3