Skip to content

Commit

Permalink
wasm: remove QWasmScreen::eventTargetId()
Browse files Browse the repository at this point in the history
Not in use: QScreen no longer processes events (moved
to QWindow),

Task-number: QTBUG-128732
Change-Id: I2d20ba0adf42117afad3cdaea0474158f2c1c54a
Reviewed-by: Piotr Wierciński <[email protected]>
Reviewed-by: Tor Arne Vestbø <[email protected]>
  • Loading branch information
Morten Sørvig committed Oct 22, 2024
1 parent c57dcfd commit 75155ce
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
12 changes: 0 additions & 12 deletions src/plugins/platforms/wasm/qwasmscreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ QWasmScreen::QWasmScreen(const emscripten::val &containerOrCanvas)
// Create "specialHTMLTargets" mapping for the canvas - the element might be unreachable based
// on its id only under some conditions, like the target being embedded in a shadow DOM or a
// subframe.
emscripten::val::module_property("specialHTMLTargets")
.set(eventTargetId().toStdString(), m_shadowContainer);

emscripten::val::module_property("specialHTMLTargets")
.set(outerScreenId().toStdString(), m_container);

Expand Down Expand Up @@ -110,9 +107,6 @@ QWasmScreen::~QWasmScreen()
{
m_intermediateContainer.call<void>("remove");

emscripten::val::module_property("specialHTMLTargets")
.set(eventTargetId().toStdString(), emscripten::val::undefined());

m_shadowContainer.set(m_canvasResizeObserverCallbackContextPropertyName,
emscripten::val(intptr_t(0)));
}
Expand Down Expand Up @@ -145,12 +139,6 @@ emscripten::val QWasmScreen::element() const
return m_shadowContainer;
}

QString QWasmScreen::eventTargetId() const
{
// Return a globally unique id for the canvas. We can choose any string,
// as long as it starts with a "!".
return QString("!qtcanvas_%1").arg(uintptr_t(this));
}

QString QWasmScreen::outerScreenId() const
{
Expand Down
1 change: 0 additions & 1 deletion src/plugins/platforms/wasm/qwasmscreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class QWasmScreen : public QObject, public QPlatformScreen, public QWasmWindowTr
static QWasmScreen *get(QPlatformScreen *screen);
static QWasmScreen *get(QScreen *screen);
emscripten::val element() const;
QString eventTargetId() const;
QString outerScreenId() const;
QPointingDevice *touchDevice() { return m_touchDevice.get(); }
QPointingDevice *tabletDevice() { return m_tabletDevice.get(); }
Expand Down

0 comments on commit 75155ce

Please sign in to comment.