diff options
Diffstat (limited to 'tests/manual/wasm/qtwasmtestlib/qtwasmtestlib.cpp')
| -rw-r--r-- | tests/manual/wasm/qtwasmtestlib/qtwasmtestlib.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/manual/wasm/qtwasmtestlib/qtwasmtestlib.cpp b/tests/manual/wasm/qtwasmtestlib/qtwasmtestlib.cpp index 1e49847c97f..484c28a484b 100644 --- a/tests/manual/wasm/qtwasmtestlib/qtwasmtestlib.cpp +++ b/tests/manual/wasm/qtwasmtestlib/qtwasmtestlib.cpp @@ -9,6 +9,12 @@ #include <emscripten.h> #include <emscripten/threading.h> +#if QT_CONFIG(wasm_jspi) +# define QT_WASM_EMSCRIPTEN_ASYNC ,emscripten::async() +#else +# define QT_WASM_EMSCRIPTEN_ASYNC +#endif + namespace QtWasmTest { namespace { QObject *g_testObject = nullptr; @@ -127,7 +133,7 @@ void passTest() EMSCRIPTEN_BINDINGS(qtwebtestrunner) { emscripten::function("cleanupTestCase", &cleanupTestCase); emscripten::function("getTestFunctions", &getTestFunctions); - emscripten::function("runTestFunction", &runTestFunction, emscripten::async()); + emscripten::function("runTestFunction", &runTestFunction QT_WASM_EMSCRIPTEN_ASYNC); emscripten::function("qtWasmFail", &failTest); emscripten::function("qtWasmPass", &passTest); } |
