summaryrefslogtreecommitdiffhomepage
path: root/compat/thread-name.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'compat/thread-name.cpp')
-rw-r--r--compat/thread-name.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/compat/thread-name.cpp b/compat/thread-name.cpp
index 504c6f19..08a7d628 100644
--- a/compat/thread-name.cpp
+++ b/compat/thread-name.cpp
@@ -20,12 +20,9 @@ struct THREADNAME_INFO
};
static inline
-void set_curthread_name_old(const QString& name_)
+void set_curthread_name_old_(const char* name)
{
- QByteArray str = name_.toLocal8Bit();
- const char* name = str.constData();
HANDLE curthread = GetCurrentThread();
-
THREADNAME_INFO info; // NOLINT(cppcoreguidelines-pro-type-member-init)
info.dwType = 0x1000;
info.szName = name;
@@ -41,6 +38,15 @@ void set_curthread_name_old(const QString& name_)
{
}
}
+
+static inline
+void set_curthread_name_old(const QString& name_)
+{
+ QByteArray str = name_.toLocal8Bit();
+ const char* name = str.constData();
+
+ set_curthread_name_old_(name);
+}
#else
static inline void set_curthread_name_old(const QString&) {}