Fix QtGui compilation without OpenGL

Change-Id: I2a9f8bde7d2ba672e4e664ff731a3272a6def516
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
hjk 2016-10-16 13:26:30 +02:00 committed by hjk
parent e9110b162c
commit d71bb504a6

View File

@ -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;
}