wasm: limit exec() workarounds to the main thread
This fixes a bug where calling exec() on a secondary thread would make the thread exit. Task-number: QTBUG-94344 Pick-to: 6.2 Change-Id: I259c7ebbd53271609af88aca141d88c282cbcd34 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>bb10
parent
8d6e825ddf
commit
8d8448a1f5
|
|
@ -206,10 +206,12 @@ bool QEventDispatcherWasm::processEvents(QEventLoop::ProcessEventsFlags flags)
|
|||
qCDebug(lcEventDispatcher) << "QEventDispatcherWasm::processEvents flags" << flags
|
||||
<< "pending events" << hasPendingEvents;
|
||||
|
||||
if (flags & QEventLoop::DialogExec)
|
||||
handleDialogExec();
|
||||
else if (flags & QEventLoop::EventLoopExec)
|
||||
handleEventLoopExec();
|
||||
if (isMainThreadEventDispatcher()) {
|
||||
if (flags & QEventLoop::DialogExec)
|
||||
handleDialogExec();
|
||||
else if (flags & QEventLoop::EventLoopExec)
|
||||
handleEventLoopExec();
|
||||
}
|
||||
|
||||
if (!(flags & QEventLoop::ExcludeUserInputEvents))
|
||||
pollForNativeEvents();
|
||||
|
|
|
|||
Loading…
Reference in New Issue