mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2024-11-21 19:24:19 +08:00
fixed compilation when using non-microsoft compiler
This commit is contained in:
parent
6ba197bce4
commit
4f4f7a7c46
@ -240,6 +240,8 @@ typedef struct tagTHREADNAME_INFO
|
||||
|
||||
typedef HRESULT(WINAPI* SetThreadDescriptionFunc)(HANDLE, PCWSTR);
|
||||
|
||||
#if defined(Q_CC_MSVC)
|
||||
|
||||
// Helper function to set the thread name using RaiseException and __try
|
||||
static void setThreadNameUsingException(HANDLE threadId, LPCSTR threadName) {
|
||||
THREADNAME_INFO info;
|
||||
@ -256,6 +258,8 @@ static void setThreadNameUsingException(HANDLE threadId, LPCSTR threadName) {
|
||||
}
|
||||
}
|
||||
|
||||
#endif // Q_CC_MSVC
|
||||
|
||||
void qt_set_thread_name(HANDLE threadId, const QString &name)
|
||||
{
|
||||
HMODULE hKernel32 = GetModuleHandleW(L"Kernel32.dll");
|
||||
|
Loading…
Reference in New Issue
Block a user