wasm: provide isValid implementation for QWasmOffscreenSurface
Fixes: QTBUG-120350 Pick-to: 6.6 Change-Id: I0cb2ba66a2d27f3d96a4a6a1cb85695f6b305178 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit 139d57a7e906b84672024661a58628918ceff928) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
df753ab453
commit
417cf07c5d
@ -27,4 +27,9 @@ QWasmOffscreenSurface::~QWasmOffscreenSurface()
|
||||
emscripten::val::module_property("specialHTMLTargets").delete_(m_specialTargetId);
|
||||
}
|
||||
|
||||
bool QWasmOffscreenSurface::isValid() const
|
||||
{
|
||||
return !m_offscreenCanvas.isNull() && !m_offscreenCanvas.isUndefined();
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -20,6 +20,7 @@ public:
|
||||
~QWasmOffscreenSurface() final;
|
||||
|
||||
const std::string &id() const { return m_specialTargetId; }
|
||||
bool isValid() const override;
|
||||
|
||||
private:
|
||||
std::string m_specialTargetId;
|
||||
|
Loading…
x
Reference in New Issue
Block a user