From 39d99c714bb87bd39e92d85fb1f46c52eb9f8d33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 2 Jul 2020 17:00:49 +0200 Subject: Fix no-OpenGL build after introducing QOpenGLContext platform interface Change-Id: I355f43c200adb3a12e71e0b02aa10060672bb9e4 Reviewed-by: Nodir Temirkhodjaev Reviewed-by: Laszlo Agocs --- src/gui/platform/macos/qcocoaplatforminterface.mm | 4 ++++ src/gui/platform/unix/qunixplatforminterface.cpp | 4 ++++ src/gui/platform/windows/qwindowsplatforminterface.cpp | 4 ++++ src/plugins/platforms/cocoa/qcocoaintegration.h | 6 ++++-- src/plugins/platforms/eglfs/api/qeglfsintegration_p.h | 2 ++ src/plugins/platforms/windows/qwindowsintegration.h | 5 ++++- src/plugins/platforms/xcb/qxcbintegration.h | 2 ++ 7 files changed, 24 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/gui/platform/macos/qcocoaplatforminterface.mm b/src/gui/platform/macos/qcocoaplatforminterface.mm index a1410a63b2..2fc9228ab1 100644 --- a/src/gui/platform/macos/qcocoaplatforminterface.mm +++ b/src/gui/platform/macos/qcocoaplatforminterface.mm @@ -48,6 +48,8 @@ QT_BEGIN_NAMESPACE using namespace QPlatformInterface::Private; +#ifndef QT_NO_OPENGL + QT_DEFINE_PLATFORM_INTERFACE(QCocoaGLContext, QOpenGLContext); QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QCocoaGLIntegration); @@ -57,4 +59,6 @@ QOpenGLContext *QPlatformInterface::QCocoaGLContext::fromNative(NSOpenGLContext &QCocoaGLIntegration::createOpenGLContext>(nativeContext, shareContext); } +#endif // QT_NO_OPENGL + QT_END_NAMESPACE diff --git a/src/gui/platform/unix/qunixplatforminterface.cpp b/src/gui/platform/unix/qunixplatforminterface.cpp index a090ef6601..2584a9b91b 100644 --- a/src/gui/platform/unix/qunixplatforminterface.cpp +++ b/src/gui/platform/unix/qunixplatforminterface.cpp @@ -49,6 +49,8 @@ QT_BEGIN_NAMESPACE using namespace QPlatformInterface::Private; +#ifndef QT_NO_OPENGL + #if defined(Q_OS_LINUX) QT_DEFINE_PLATFORM_INTERFACE(QGLXContext, QOpenGLContext); QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QGLXIntegration); @@ -77,4 +79,6 @@ QOpenGLContext *QPlatformInterface::QEGLContext::fromNative(EGLContext context, } #endif +#endif // QT_NO_OPENGL + QT_END_NAMESPACE diff --git a/src/gui/platform/windows/qwindowsplatforminterface.cpp b/src/gui/platform/windows/qwindowsplatforminterface.cpp index ceb65cda5b..6ace981475 100644 --- a/src/gui/platform/windows/qwindowsplatforminterface.cpp +++ b/src/gui/platform/windows/qwindowsplatforminterface.cpp @@ -46,6 +46,8 @@ QT_BEGIN_NAMESPACE using namespace QPlatformInterface::Private; +#ifndef QT_NO_OPENGL + QT_DEFINE_PLATFORM_INTERFACE(QWGLContext, QOpenGLContext); QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QWindowsGLIntegration); @@ -61,4 +63,6 @@ QOpenGLContext *QPlatformInterface::QWGLContext::fromNative(HGLRC context, HWND &QWindowsGLIntegration::createOpenGLContext>(context, window, shareContext); } +#endif // QT_NO_OPENGL + QT_END_NAMESPACE diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.h b/src/plugins/platforms/cocoa/qcocoaintegration.h index f82e0050ae..f8b9e9fc12 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.h +++ b/src/plugins/platforms/cocoa/qcocoaintegration.h @@ -62,8 +62,10 @@ Q_FORWARD_DECLARE_OBJC_CLASS(NSToolbar); QT_BEGIN_NAMESPACE -class QCocoaIntegration : public QObject, public QPlatformIntegration, - public QPlatformInterface::Private::QCocoaGLIntegration +class QCocoaIntegration : public QObject, public QPlatformIntegration +#ifndef QT_NO_OPENGL + , public QPlatformInterface::Private::QCocoaGLIntegration +#endif { Q_OBJECT public: diff --git a/src/plugins/platforms/eglfs/api/qeglfsintegration_p.h b/src/plugins/platforms/eglfs/api/qeglfsintegration_p.h index baf9baadda..babcbfaaa4 100644 --- a/src/plugins/platforms/eglfs/api/qeglfsintegration_p.h +++ b/src/plugins/platforms/eglfs/api/qeglfsintegration_p.h @@ -68,7 +68,9 @@ class QFbVtHandler; class QEvdevKeyboardManager; class Q_EGLFS_EXPORT QEglFSIntegration : public QPlatformIntegration, public QPlatformNativeInterface +#ifndef QT_NO_OPENGL , public QPlatformInterface::Private::QEGLIntegration +#endif { public: QEglFSIntegration(); diff --git a/src/plugins/platforms/windows/qwindowsintegration.h b/src/plugins/platforms/windows/qwindowsintegration.h index 348da5c58c..207e018ca8 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.h +++ b/src/plugins/platforms/windows/qwindowsintegration.h @@ -54,7 +54,10 @@ struct QWindowsWindowData; class QWindowsWindow; class QWindowsStaticOpenGLContext; -class QWindowsIntegration : public QPlatformIntegration, public QPlatformInterface::Private::QWindowsGLIntegration +class QWindowsIntegration : public QPlatformIntegration +#ifndef QT_NO_OPENGL + , public QPlatformInterface::Private::QWindowsGLIntegration +#endif { Q_DISABLE_COPY_MOVE(QWindowsIntegration) public: diff --git a/src/plugins/platforms/xcb/qxcbintegration.h b/src/plugins/platforms/xcb/qxcbintegration.h index 37d2db394c..013555c6e0 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.h +++ b/src/plugins/platforms/xcb/qxcbintegration.h @@ -56,8 +56,10 @@ class QAbstractEventDispatcher; class QXcbNativeInterface; class Q_XCB_EXPORT QXcbIntegration : public QPlatformIntegration +#ifndef QT_NO_OPENGL , public QPlatformInterface::Private::QGLXIntegration , public QPlatformInterface::Private::QEGLIntegration +#endif { public: QXcbIntegration(const QStringList ¶meters, int &argc, char **argv); -- cgit v1.2.3