xcb: Remove need for QXCBScreen to resolve QXcbGlIntegration

Change-Id: I9de4f47bfdf88c92959f210e05c1fc1e8a459cde
Reviewed-by: Liang Qi <liang.qi@qt.io>
This commit is contained in:
Tor Arne Vestbø 2020-06-18 17:03:03 +02:00
parent 1e39b39ddb
commit 590ac717a2

View File

@ -268,8 +268,7 @@ QPlatformWindow *QXcbIntegration::createForeignWindow(QWindow *window, WId nativ
#ifndef QT_NO_OPENGL
QPlatformOpenGLContext *QXcbIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
{
QXcbScreen *screen = static_cast<QXcbScreen *>(context->screen()->handle());
QXcbGlIntegration *glIntegration = screen->connection()->glIntegration();
QXcbGlIntegration *glIntegration = m_connection->glIntegration();
if (!glIntegration) {
qWarning("QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled");
return nullptr;