diff options
author | hjk <hjk@theqtcompany.com> | 2016-10-16 13:26:30 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2016-10-16 15:14:13 +0000 |
commit | d71bb504a635b51a85f3ccd919e0d77f869e50a8 (patch) | |
tree | ff47b13ca1b8b9eb05ffac19f437c7e002e120cd /src/gui/kernel/qsurfaceformat.cpp | |
parent | e9110b162cad1c07341fa3ed424484a58f9c642a (diff) |
Fix QtGui compilation without OpenGL
Change-Id: I2a9f8bde7d2ba672e4e664ff731a3272a6def516
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/gui/kernel/qsurfaceformat.cpp')
-rw-r--r-- | src/gui/kernel/qsurfaceformat.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/kernel/qsurfaceformat.cpp b/src/gui/kernel/qsurfaceformat.cpp index 18fde5716b..109ba8e610 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; } |