From ee23941c297596ccc95a103ad6d48e6b7866b5fa Mon Sep 17 00:00:00 2001 From: Mikolaj Boc Date: Wed, 29 Mar 2023 09:47:00 +0200 Subject: [PATCH] Introduce qstdweb::bindForever stub for submodule update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The qstdweb::bindForever function will be introduced soon for binding callbacks with forever lifetime. For now, since submodules have to be adapted first, introduce a stub function to port qtmultimedia which uses Promise::make - it will have its interface changed with relation to bindForever. Task-number: QTBUG-112296 Change-Id: I578e1633574e11877a8f5ec14d0f00dfd7c766bf Reviewed-by: Aleksandr Reviakin Reviewed-by: Piotr WierciƄski Reviewed-by: Lorn Potter --- src/corelib/platform/wasm/qstdweb_p.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/corelib/platform/wasm/qstdweb_p.h b/src/corelib/platform/wasm/qstdweb_p.h index 68a1a6fd2ae..94b99bb0d70 100644 --- a/src/corelib/platform/wasm/qstdweb_p.h +++ b/src/corelib/platform/wasm/qstdweb_p.h @@ -196,6 +196,12 @@ namespace qstdweb { void Q_CORE_EXPORT all(std::vector promises, PromiseCallbacks callbacks); }; + template + decltype(auto) bindForever(F wrappedCallback) + { + return wrappedCallback; + } + inline emscripten::val window() { static emscripten::val savedWindow = emscripten::val::global("window");