From 89cda52d66053c1cdddc709bedb2c1bf1e4b30cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Wed, 18 Aug 2021 14:54:11 +0200 Subject: [PATCH] wasm: enable the new event dispatcher for qtcore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the new event dispatcher for all non-GUI threads, nn practice for the main thread when using QCoreApplication, and when calling QThread::exec(). Change-Id: I9184d52532e06da7e6a87ee27c7d53e0d15e693a Reviewed-by: Tor Arne Vestbø --- src/corelib/thread/qthread_unix.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp index 4cbe0727273..ad13f10890f 100644 --- a/src/corelib/thread/qthread_unix.cpp +++ b/src/corelib/thread/qthread_unix.cpp @@ -47,6 +47,8 @@ #if defined(Q_OS_DARWIN) # include +#elif defined(Q_OS_WASM) +# include #else # if !defined(QT_NO_GLIB) # include "../kernel/qeventdispatcher_glib_p.h" @@ -250,6 +252,8 @@ QAbstractEventDispatcher *QThreadPrivate::createEventDispatcher(QThreadData *dat return new QEventDispatcherCoreFoundation; else return new QEventDispatcherUNIX; +#elif defined(Q_OS_WASM) + return new QEventDispatcherWasm(); #elif !defined(QT_NO_GLIB) const bool isQtMainThread = data->thread.loadAcquire() == QCoreApplicationPrivate::mainThread(); if (qEnvironmentVariableIsEmpty("QT_NO_GLIB")