diff --git a/src/calibre/headless/headless_integration.cpp b/src/calibre/headless/headless_integration.cpp index 573e8f06d3..aed9321e65 100644 --- a/src/calibre/headless/headless_integration.cpp +++ b/src/calibre/headless/headless_integration.cpp @@ -47,10 +47,18 @@ bool HeadlessIntegration::hasCapability(QPlatformIntegration::Capability cap) co switch (cap) { case ThreadedPixmaps: return true; case MultipleWindows: return true; + case OpenGL: return false; + case ThreadedOpenGL: return false; default: return QPlatformIntegration::hasCapability(cap); } } +QPlatformOpenGLContext *HeadlessIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const +{ + // Suppress warnings about this plugin not supporting createPlatformOpenGLContext that come from the default implementation of this function + return 0; +} + // Dummy font database that does not scan the fonts directory to be // used for command line tools like qmlplugindump that do not create windows // unless DebugBackingStore is activated. diff --git a/src/calibre/headless/headless_integration.h b/src/calibre/headless/headless_integration.h index 4ddd7df0aa..71e9bb2760 100644 --- a/src/calibre/headless/headless_integration.h +++ b/src/calibre/headless/headless_integration.h @@ -38,6 +38,7 @@ public: QPlatformWindow *createPlatformWindow(QWindow *window) const; QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const; QAbstractEventDispatcher *createEventDispatcher() const; + QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const; unsigned options() const { return 0; }