Skip to content

Commit b5e47fa

Browse files
QThread/Unix: fix silly mistake: static was missing after refactoring
Amends commit 6763e25, which refactored static struct Cleanup { to move the body if said cleaning up closer to the rest of the clean up code in QThreadDataDestroyer::EarlyMainThread. But it accidentally forgot the static keyword. As a result, we attempted to clean up before ::currentThreadData was set yet, resulting in a no-op and no clean up. Task-number: QTBUG-135044 Task-number: QTBUG-134080 Task-number: QTBUG-133861 Task-number: QTBUG-132697 Task-number: QTBUG-102984 Task-number: QTBUG-132381 Pick-to: dev 6.9 6.8 Change-Id: Ibe40567bba8dea205401fffdb71f7e6a3be130e4 Reviewed-by: Volker Hilsheimer <[email protected]>
1 parent c63c918 commit b5e47fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/corelib/thread/qthread_unix.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ static void set_thread_data(QThreadData *data) noexcept
243243
// As noted above: one global static for the thread that called
244244
// ::exit() (which may not be a Qt thread) and the pthread_key_t for
245245
// all others.
246-
QThreadDataDestroyer::EarlyMainThread currentThreadCleanup;
246+
static QThreadDataDestroyer::EarlyMainThread currentThreadCleanup;
247247
pthread_setspecific(threadDataDestroyer.key, data);
248248
}
249249
currentThreadData = data;

0 commit comments

Comments
 (0)