diff options
author | Amir Masoud Abdol <[email protected]> | 2023-04-13 12:17:29 +0200 |
---|---|---|
committer | Amir Masoud Abdol <[email protected]> | 2023-04-14 11:03:49 +0200 |
commit | 0044b22f933727eba08aada3c0919a18b1c80f74 (patch) | |
tree | 0da63e812389455fafd0fef02c82fc2c25b34ab8 | |
parent | d2046cea53c4bdbd6dcdb0cb8ba3f6a2ad0b970f (diff) |
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.
Task-number: QTBUG-109394
Change-Id: I174b601e06c4acdea45cc66495c09aafba6f48f6
Reviewed-by: Alexandru Croitor <[email protected]>
Reviewed-by: Alexey Edelev <[email protected]>
(cherry picked from commit 9031142e63b954031134d12b8e9fb1f9c850acfa)
-rw-r--r-- | src/plugins/platforms/wasm/qwasmaccessibility.cpp | 10 | ||||
-rw-r--r-- | src/plugins/platforms/wasm/qwasmcompositor.cpp | 9 |
2 files changed, 3 insertions, 16 deletions
diff --git a/src/plugins/platforms/wasm/qwasmaccessibility.cpp b/src/plugins/platforms/wasm/qwasmaccessibility.cpp index 523f94578bc..e509f20e0a8 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<QWasmWindow*>(window->handle()); -} -} // namespace - QWasmAccessibility::QWasmAccessibility() { @@ -108,7 +101,8 @@ void QWasmAccessibility::enableAccessibility() emscripten::val QWasmAccessibility::getContainer(QWindow *window) { - return window ? asWasmWindow(window)->a11yContainer() : emscripten::val::undefined(); + return window ? static_cast<QWasmWindow *>(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 56b0592d6b0..1836f6a6b53 100644 --- a/src/plugins/platforms/wasm/qwasmcompositor.cpp +++ b/src/plugins/platforms/wasm/qwasmcompositor.cpp @@ -17,13 +17,6 @@ #include <emscripten/bind.h> -namespace { -QWasmWindow *asWasmWindow(QWindow *window) -{ - return static_cast<QWasmWindow*>(window->handle()); -} -} // namespace - using namespace emscripten; Q_GUI_EXPORT int qt_defaultDpiX(); @@ -207,7 +200,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<QWasmWindow *>(window->handle())); } int dpiScaled(qreal value) |