From d71bb504a635b51a85f3ccd919e0d77f869e50a8 Mon Sep 17 00:00:00 2001 From: hjk Date: Sun, 16 Oct 2016 13:26:30 +0200 Subject: Fix QtGui compilation without OpenGL Change-Id: I2a9f8bde7d2ba672e4e664ff731a3272a6def516 Reviewed-by: Laszlo Agocs --- src/gui/kernel/qsurfaceformat.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/gui/kernel/qsurfaceformat.cpp b/src/gui/kernel/qsurfaceformat.cpp index 18fde5716b1..109ba8e6102 100644 --- a/src/gui/kernel/qsurfaceformat.cpp +++ b/src/gui/kernel/qsurfaceformat.cpp @@ -759,11 +759,13 @@ Q_GLOBAL_STATIC(QSurfaceFormat, qt_default_surface_format) */ void QSurfaceFormat::setDefaultFormat(const QSurfaceFormat &format) { +#ifndef QT_NO_OPENGL QOpenGLContext *globalContext = QOpenGLContext::globalShareContext(); if (globalContext && globalContext->isValid()) { qWarning("Warning: Setting a new default format with a different version or profile after " "the global shared context is created may cause issues with context sharing."); } +#endif *qt_default_surface_format() = format; } -- cgit v1.2.3