summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/kernel/qsurfaceformat.cpp2
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;
}