desktop/source/app/sofficemain.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 7c4844ab3f7f08468c53b922a320045e410fbc4e
Author:     Stephan Bergmann <stephan.bergm...@allotropia.de>
AuthorDate: Wed Jan 15 10:45:25 2025 +0100
Commit:     Stephan Bergmann <stephan.bergm...@allotropia.de>
CommitDate: Wed Jan 15 16:19:43 2025 +0100

    We don't need that hack with --enable-emscripten-jspi
    
    With recent Qt6 dev branch (which is the only Qt that supports
    -feature-wasm-jspi, and which is still experimental there), plain
    --disable-emscripten-jspi would call emscripten_set_main_loop via LO's
    soffice_main -> SVMain -> ImplSVMain -> desktop::Desktop::Main ->
    Application::Execute -> QtInstance::DoExecute calling Qt's 
QApplication::exec ->
    QGuiApplication::exec -> QCoreApplication::exec -> QEventLoop::exec ->
    QEventDispatcherWasm::processEvents ->
    QEventDispatcherWasm::handleApplicationExec.
    
    But --enable-emscripten-jspi, where Application::IsUseSystemEventLoop 
returns
    false, doesn't call into QApplication::exec from QtInstance::DoExecute
    (vcl/qt5/QtInstance.cxx), so never calls emscripten_set_main_loop, so 
doesn't
    need the hack here.
    
    Change-Id: I0d0baed40d638bbad4359306aff8f2a3e7e76a9e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180269
    Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de>
    Tested-by: Jenkins

diff --git a/desktop/source/app/sofficemain.cxx 
b/desktop/source/app/sofficemain.cxx
index bfa1a66d886a..ac0f72ec5521 100644
--- a/desktop/source/app/sofficemain.cxx
+++ b/desktop/source/app/sofficemain.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <sal/config.h>
+#include <config_emscripten.h>
 #include <config_features.h>
 
 #include <desktop/dllapi.h>
@@ -74,7 +75,7 @@ extern "C" int DESKTOP_DLLPUBLIC soffice_main()
 #endif
     tools::extendApplicationEnvironment();
 
-#if defined EMSCRIPTEN
+#if defined EMSCRIPTEN && !HAVE_EMSCRIPTEN_JSPI
     //HACK: Qt5 QWasmEventDispatcher::processEvents
     // (qtbase/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp) calls
     // emscripten_set_main_loop_arg with simulateInfiniteLoop == true, and as 
we use

Reply via email to