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 <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This commit is contained in:
Amir Masoud Abdol 2023-04-13 12:17:29 +02:00
parent c91ae574ed
commit 9031142e63
2 changed files with 3 additions and 13 deletions

View File

@ -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()
{
@ -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<QWasmWindow *>(window->handle())->a11yContainer()
: emscripten::val::undefined();
}
emscripten::val QWasmAccessibility::getContainer(QAccessibleInterface *iface)

View File

@ -9,10 +9,6 @@
#include <emscripten/html5.h>
namespace {
QWasmWindow *asWasmWindow(QWindow *window)
{
return static_cast<QWasmWindow*>(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<QWasmWindow *>(window->handle()));
}
void QWasmCompositor::frame(const QList<QWasmWindow *> &windows)