mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Suppress warnings about OpenGL when running without connecting to X server in Qt 5.4.1
This commit is contained in:
parent
1f6d66e015
commit
259e51d408
@ -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.
|
||||
|
@ -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; }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user