Fix QtGui compilation without OpenGL
Change-Id: I2a9f8bde7d2ba672e4e664ff731a3272a6def516 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
parent
e9110b162c
commit
d71bb504a6
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user