From f90c68316c622971706568303a025bbc58351df3 Mon Sep 17 00:00:00 2001 From: Jan-Marek Glogowski Date: Fri, 23 Apr 2021 14:03:31 +0200 Subject: WASM: add Emscripten demo application Change-Id: I31297142761255b1f357fc9677a644b7a93c921a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111128 Tested-by: Jenkins Reviewed-by: Thorsten Behrens --- vcl/qt5/Qt5Instance.cxx | 9 +++++++-- vcl/qt5/Qt5MainWindow.cxx | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'vcl/qt5') diff --git a/vcl/qt5/Qt5Instance.cxx b/vcl/qt5/Qt5Instance.cxx index f0c1f56f6690..bf8d52961960 100644 --- a/vcl/qt5/Qt5Instance.cxx +++ b/vcl/qt5/Qt5Instance.cxx @@ -54,6 +54,11 @@ #include #include +#ifdef EMSCRIPTEN +#include +Q_IMPORT_PLUGIN(QWasmIntegrationPlugin) +#endif + namespace { /// TODO: not much Qt5 specific here? could be generalised, esp. for OSX... @@ -427,7 +432,7 @@ OUString Qt5Instance::GetConnectionIdentifier() { return OUString(); } void Qt5Instance::AddToRecentDocumentList(const OUString&, const OUString&, const OUString&) {} -OpenGLContext* Qt5Instance::CreateOpenGLContext() { return new Qt5OpenGLContext; } +OpenGLContext* Qt5Instance::CreateOpenGLContext() { return nullptr; } bool Qt5Instance::IsMainThread() const { @@ -570,7 +575,7 @@ void* Qt5Instance::CreateGStreamerSink(const SystemChildWindow* pWindow) return pVideosink; #else - (void*)pWindow; + Q_UNUSED(pWindow); return nullptr; #endif } diff --git a/vcl/qt5/Qt5MainWindow.cxx b/vcl/qt5/Qt5MainWindow.cxx index 45d726ba22be..89879864a9bc 100644 --- a/vcl/qt5/Qt5MainWindow.cxx +++ b/vcl/qt5/Qt5MainWindow.cxx @@ -19,7 +19,9 @@ Qt5MainWindow::Qt5MainWindow(Qt5Frame& rFrame, Qt::WindowFlags f) : QMainWindow(nullptr, f) , m_rFrame(rFrame) { +#ifndef EMSCRIPTEN QAccessible::installFactory(Qt5AccessibleWidget::customFactory); +#endif } void Qt5MainWindow::closeEvent(QCloseEvent* pEvent) -- cgit