vcl/inc/qt5/Qt5Instance.hxx | 3 +++ vcl/qt5/Qt5Instance.cxx | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-)
New commits: commit 83be3b84228a67315882b65dc51cc86dc9d9afcc Author: Jan-Marek Glogowski <glo...@fbihome.de> AuthorDate: Thu Aug 19 20:18:47 2021 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Wed Aug 25 10:30:03 2021 +0200 tdf#143957 Qt5 always create an OpenGLContext Nothing checks the result and a lot of code just uses it. Change-Id: I1a672e98d42673fd684538ead831622f6a14e9f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120761 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glo...@fbihome.de> (cherry picked from commit 0f7fed9249e988ca34c5401d746887822b4aa9ce) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120776 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/vcl/inc/qt5/Qt5Instance.hxx b/vcl/inc/qt5/Qt5Instance.hxx index 41b9aca894d0..dc347021b9bb 100644 --- a/vcl/inc/qt5/Qt5Instance.hxx +++ b/vcl/inc/qt5/Qt5Instance.hxx @@ -133,7 +133,10 @@ public: virtual bool DoYield(bool bWait, bool bHandleAllCurrentEvents) override; virtual bool AnyInput(VclInputFlags nType) override; +// so we fall back to the default abort, instead of duplicating it... +#ifndef EMSCRIPTEN virtual OpenGLContext* CreateOpenGLContext() override; +#endif virtual OUString GetConnectionIdentifier() override; diff --git a/vcl/qt5/Qt5Instance.cxx b/vcl/qt5/Qt5Instance.cxx index bf8d52961960..432af5e6f718 100644 --- a/vcl/qt5/Qt5Instance.cxx +++ b/vcl/qt5/Qt5Instance.cxx @@ -245,6 +245,10 @@ Qt5Instance::Qt5Instance(std::unique_ptr<QApplication>& pQApp, bool bUseCairo) connect(QGuiApplication::inputMethod(), &QInputMethod::localeChanged, this, &Qt5Instance::localeChanged); + +#ifdef EMSCRIPTEN + m_bSupportsOpenGL = false; +#endif } Qt5Instance::~Qt5Instance() @@ -432,7 +436,9 @@ OUString Qt5Instance::GetConnectionIdentifier() { return OUString(); } void Qt5Instance::AddToRecentDocumentList(const OUString&, const OUString&, const OUString&) {} -OpenGLContext* Qt5Instance::CreateOpenGLContext() { return nullptr; } +#ifndef EMSCRIPTEN +OpenGLContext* Qt5Instance::CreateOpenGLContext() { return new Qt5OpenGLContext; } +#endif bool Qt5Instance::IsMainThread() const {