From 259adc5e77a40bc8f0b7e4c17f7a38bfc4ad511b Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Mon, 20 Feb 2017 13:15:40 +0100 Subject: Fix build with -no-opengl Change-Id: I6fb61944ef88e328a94ea6b7ab42db271828a602 Reviewed-by: Lars Knoll Reviewed-by: Laszlo Agocs --- src/plugins/platforms/eglfs/api/qeglfscursor_p.h | 6 +++++- .../platforms/eglfs/deviceintegration/deviceintegration.pro | 2 +- .../eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp | 7 ++++--- .../deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevice.cpp | 4 ++-- .../eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp | 6 +++++- 5 files changed, 17 insertions(+), 8 deletions(-) (limited to 'src/plugins/platforms/eglfs') diff --git a/src/plugins/platforms/eglfs/api/qeglfscursor_p.h b/src/plugins/platforms/eglfs/api/qeglfscursor_p.h index 942fb09aac..aaeb83cb99 100644 --- a/src/plugins/platforms/eglfs/api/qeglfscursor_p.h +++ b/src/plugins/platforms/eglfs/api/qeglfscursor_p.h @@ -79,7 +79,10 @@ private: QEglFSCursor *m_cursor; }; -class Q_EGLFS_EXPORT QEglFSCursor : public QPlatformCursor, protected QOpenGLFunctions +#if QT_CONFIG(opengl) + +class Q_EGLFS_EXPORT QEglFSCursor : public QPlatformCursor + , protected QOpenGLFunctions { Q_OBJECT public: @@ -153,6 +156,7 @@ private: }; QHash m_gfx; }; +#endif // QT_CONFIG(opengl) QT_END_NAMESPACE diff --git a/src/plugins/platforms/eglfs/deviceintegration/deviceintegration.pro b/src/plugins/platforms/eglfs/deviceintegration/deviceintegration.pro index aca0078bfb..6d759938b5 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/deviceintegration.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/deviceintegration.pro @@ -9,7 +9,7 @@ qtConfig(eglfs_mali): SUBDIRS += eglfs_mali qtConfig(eglfs_viv): SUBDIRS += eglfs_viv qtConfig(eglfs_viv_wl): SUBDIRS += eglfs_viv_wl -SUBDIRS += eglfs_emu +qtConfig(opengl): SUBDIRS += eglfs_emu eglfs_kms_egldevice.depends = eglfs_kms_support eglfs_kms.depends = eglfs_kms_support diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp index 16767114ab..b6cdcf92b6 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp @@ -105,12 +105,13 @@ void QEglFSKmsGbmIntegration::destroyNativeWindow(EGLNativeWindowType window) QPlatformCursor *QEglFSKmsGbmIntegration::createCursor(QPlatformScreen *screen) const { - if (screenConfig()->hwCursor()) { - return nullptr; - } else { +#if QT_CONFIG(opengl) + if (!screenConfig()->hwCursor()) { qCDebug(qLcEglfsKmsDebug, "Using plain OpenGL mouse cursor"); return new QEglFSCursor(screen); } +#endif + return nullptr; } void QEglFSKmsGbmIntegration::presentBuffer(QPlatformSurface *surface) diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevice.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevice.cpp index f0bf59466e..0a66a897a1 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevice.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevice.cpp @@ -85,12 +85,12 @@ EGLNativeDisplayType QEglFSKmsEglDevice::nativeDisplay() const QPlatformScreen *QEglFSKmsEglDevice::createScreen(const QKmsOutput &output) { QEglFSKmsScreen *screen = new QEglFSKmsEglDeviceScreen(this, output); - +#if QT_CONFIG(opengl) if (!m_globalCursor && !screenConfig()->separateScreens()) { qCDebug(qLcEglfsKmsDebug, "Creating new global mouse cursor"); m_globalCursor = new QEglFSCursor(screen); } - +#endif return screen; } diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp index 3e333fc25a..43bdb77a18 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp @@ -280,7 +280,11 @@ bool QEglFSKmsEglDeviceIntegration::query_egl_device() QPlatformCursor *QEglFSKmsEglDeviceIntegration::createCursor(QPlatformScreen *screen) const { - return screenConfig()->separateScreens() ? new QEglFSCursor(screen) : nullptr; +#if QT_CONFIG(opengl) + if (screenConfig()->separateScreens()) + return new QEglFSCursor(screen); +#endif + return nullptr; } QT_END_NAMESPACE -- cgit v1.2.3