wams: disable delayed onload/first frame features

requestUpdateHold was not getting enabled properly in some
cases, in particular when using a custom html file to load
the application.

The assert on g_mainThreadEnvetDispatcher is also asserting,
with a following dereference of a null pointer.

Change-Id: Ibf77d90b84f8319a894e2df34a134d2e4265fe05
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit 10afdc339e08ce1e6a8173df97a3f2edeb27cb57)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Morten Sørvig 2024-08-30 16:15:18 +02:00 committed by Qt Cherry-pick Bot
parent 0ae162e2a9
commit 98c1a46a7d
2 changed files with 1 additions and 4 deletions

View File

@ -931,9 +931,6 @@ void QEventDispatcherWasm::callOnLoadedIfRequired()
if (qtLoadedCalled) if (qtLoadedCalled)
return; return;
qtLoadedCalled = true; qtLoadedCalled = true;
Q_ASSERT(g_mainThreadEventDispatcher);
g_mainThreadEventDispatcher->onLoaded();
} }
void QEventDispatcherWasm::onLoaded() void QEventDispatcherWasm::onLoaded()

View File

@ -12,7 +12,7 @@
using namespace emscripten; using namespace emscripten;
bool QWasmCompositor::m_requestUpdateHoldEnabled = true; bool QWasmCompositor::m_requestUpdateHoldEnabled = false;
QWasmCompositor::QWasmCompositor(QWasmScreen *screen) : QObject(screen) QWasmCompositor::QWasmCompositor(QWasmScreen *screen) : QObject(screen)
{ {