From 3b98fe7f773668ed8b35478fa3a8ca0590acc450 Mon Sep 17 00:00:00 2001 From: Alexander Volkov Date: Mon, 18 Nov 2019 18:53:59 +0300 Subject: xcb: Simplify code by using helper QXcbIntegration::defaultConnection() Change-Id: Ieb0e21d85fcd0c168b1bb090e967d02a8a6a6083 Reviewed-by: Mikhail Svetkin --- src/plugins/platforms/xcb/qxcbintegration.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/plugins/platforms/xcb') diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp index 95ca40fc95..efda6b67ce 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.cpp +++ b/src/plugins/platforms/xcb/qxcbintegration.cpp @@ -317,8 +317,7 @@ bool QXcbIntegration::hasCapability(QPlatformIntegration::Capability cap) const case OpenGL: case ThreadedOpenGL: { - const auto *connection = qAsConst(m_connections).first(); - if (const auto *integration = connection->glIntegration()) + if (const auto *integration = defaultConnection()->glIntegration()) return cap != ThreadedOpenGL || integration->supportsThreadedOpenGL(); return false; } -- cgit v1.2.3