From 9031142e63b954031134d12b8e9fb1f9c850acfa Mon Sep 17 00:00:00 2001 From: Amir Masoud Abdol Date: Thu, 13 Apr 2023 12:17:29 +0200 Subject: [PATCH] Replace a duplicate symbol Removed the two identical functions and directly call the `static_cast` in their place. This is to resolve a build issue when doing unity build. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: I174b601e06c4acdea45cc66495c09aafba6f48f6 Reviewed-by: Alexandru Croitor Reviewed-by: Alexey Edelev --- src/plugins/platforms/wasm/qwasmaccessibility.cpp | 10 ++-------- src/plugins/platforms/wasm/qwasmcompositor.cpp | 6 +----- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/plugins/platforms/wasm/qwasmaccessibility.cpp b/src/plugins/platforms/wasm/qwasmaccessibility.cpp index 072f65aa874..0509e69c136 100644 --- a/src/plugins/platforms/wasm/qwasmaccessibility.cpp +++ b/src/plugins/platforms/wasm/qwasmaccessibility.cpp @@ -21,13 +21,6 @@ Q_LOGGING_CATEGORY(lcQpaAccessibility, "qt.qpa.accessibility") // events. In addition or alternatively, we could also walk the accessibility tree // from setRootObject(). -namespace { -QWasmWindow *asWasmWindow(QWindow *window) -{ - return static_cast(window->handle()); -} -} // namespace - QWasmAccessibility::QWasmAccessibility() { @@ -105,7 +98,8 @@ void QWasmAccessibility::enableAccessibility() emscripten::val QWasmAccessibility::getContainer(QWindow *window) { - return window ? asWasmWindow(window)->a11yContainer() : emscripten::val::undefined(); + return window ? static_cast(window->handle())->a11yContainer() + : emscripten::val::undefined(); } emscripten::val QWasmAccessibility::getContainer(QAccessibleInterface *iface) diff --git a/src/plugins/platforms/wasm/qwasmcompositor.cpp b/src/plugins/platforms/wasm/qwasmcompositor.cpp index 1fafd5d9e85..5deba235486 100644 --- a/src/plugins/platforms/wasm/qwasmcompositor.cpp +++ b/src/plugins/platforms/wasm/qwasmcompositor.cpp @@ -9,10 +9,6 @@ #include namespace { -QWasmWindow *asWasmWindow(QWindow *window) -{ - return static_cast(window->handle()); -} QWasmWindowStack::PositionPreference positionPreferenceFromWindowFlags(Qt::WindowFlags flags) { @@ -191,7 +187,7 @@ void QWasmCompositor::handleBackingStoreFlush(QWindow *window) // Request update to flush the updated backing store content, unless we are currently // processing an update, in which case the new content will flushed as a part of that update. if (!m_inDeliverUpdateRequest) - requestUpdateWindow(asWasmWindow(window)); + requestUpdateWindow(static_cast(window->handle())); } void QWasmCompositor::frame(const QList &windows)