From 5b7277947cb4ad64f0e784232ace72a9422d692e Mon Sep 17 00:00:00 2001 From: Lorn Potter Date: Wed, 27 Dec 2023 15:04:34 +1000 Subject: [PATCH] wasm: fix single thread apps build QScopedScopeLevelCounter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QScopedScopeLevelCounter was added and it doesn't really need threads to function, but apps fail to link without it. Change-Id: I7b355369079bc11b8b8b45b3ee1bf5ba81cd1953 Reviewed-by: Piotr Wierciński Reviewed-by: Tor Arne Vestbø --- src/corelib/thread/qthread.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp index 28845078d6..aaeca48359 100644 --- a/src/corelib/thread/qthread.cpp +++ b/src/corelib/thread/qthread.cpp @@ -146,6 +146,7 @@ void QAdoptedThread::run() // this function should never be called qFatal("QAdoptedThread::run(): Internal error, this implementation should never be called."); } +#endif QScopedScopeLevelCounter::QScopedScopeLevelCounter(QThreadData *threadData) : threadData(threadData) @@ -162,6 +163,7 @@ QScopedScopeLevelCounter::~QScopedScopeLevelCounter() << "scope level to" << threadData->scopeLevel; } +#if QT_CONFIG(thread) /* QThreadPrivate */