qt5base-lts/tests/manual/wasm
Morten Sørvig a4d1c30a1b wasm: clarify qtloader onExit behavior
onExit is called whenever the application exits, i.e.
when the app canvas should no longer be displayed and
the loader/embedder code should take some action.

Emscripten provides two callbacks which can be used
here:
  - onExit, called when the app exits (but see EXIT_RUNTIME)
  - onAbort, called on abort errors.

These map to the two cases Qt's onExit supports. onExit
is not called when EXIT_RUNTIME is disabled, which means
we don't need the special case for exit code 0.

In addition call onExit on any exception. The second
call to showUi() in html_shell.html is then not needed
any more and we avoid duplicating the UI state handling
in user code.

Update the qtloader_integration test to handle changes in
behavior (we no longer set the error text on exit). Use
emscripten_force_exit() to simulate application exit -
using this function makes Emscripten call onExit even
when EXIT_RUNTIME is disabled.

Pick-to: 6.6
Change-Id: I72b5463c1836e8d5054e594abbd304fbc67032b7
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2023-07-10 05:13:56 +02:00
..
a11y Make WASM export names different across modules 2023-06-20 09:08:03 +02:00
clipboard tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
cursors Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
eventloop Make WASM export names different across modules 2023-06-20 09:08:03 +02:00
localfiles Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
network Make WASM export names different across modules 2023-06-20 09:08:03 +02:00
qstdweb Make WASM export names different across modules 2023-06-20 09:08:03 +02:00
qtloader Set up a manual test for qt loader 2022-11-24 18:47:49 +01:00
qtloader_integration wasm: clarify qtloader onExit behavior 2023-07-10 05:13:56 +02:00
qtwasmtestlib Make WASM export names different across modules 2023-06-20 09:08:03 +02:00
qwasmwindow Add keyboard input testcase to the QWasmWindow test 2023-06-20 07:34:09 +02:00
rasterwindow Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
shared Add test filter argument to wasm js test runner 2023-06-15 18:55:32 +02:00
CMakeLists.txt Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
README.md wasm: add qtwasmtestlib 2022-06-29 15:09:02 +02:00

Manual tests and examples for Qt on WebAssembly

These examples demonstrates various technical aspects of the Qt for WebAssambly platform port, and can be used as a reference when writing application code.

Content

cursors         Cursor handling
eventloop       Event loops, application startup, dialog exec()
localfiles      Local file download and upload
rasterwindow    Basic GUI app, event handling
qtwasmtestlib   native auto test framework