QThread: set the thread name on Windows even in release builds of Qt

It's not really clear why this feature shouldn't work in release
builds of Qt. This aligns the behavior with UNIX.

Change-Id: I6a2f50640ab0b2e109e4c3ef7317954a3e8c79a2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
Giuseppe D'Angelo 2024-02-28 10:54:39 +01:00
parent 6848969cbc
commit e60e2bf765
1 changed files with 1 additions and 1 deletions

View File

@ -246,7 +246,7 @@ unsigned int __stdcall QT_ENSURE_STACK_ALIGNED_FOR_SSE QThreadPrivate::start(voi
data->ensureEventDispatcher();
data->eventDispatcher.loadRelaxed()->startingUp();
#if !defined(QT_NO_DEBUG) && defined(Q_CC_MSVC)
#if defined(Q_CC_MSVC)
// sets the name of the current thread.
QString threadName = std::exchange(thr->d_func()->objectName, {});
if (Q_LIKELY(threadName.isEmpty()))