xcb: Simplify code by using helper QXcbIntegration::defaultConnection()

Change-Id: Ieb0e21d85fcd0c168b1bb090e967d02a8a6a6083
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@gmail.com>
bb10
Alexander Volkov 2019-11-18 18:53:59 +03:00
parent c8df1a2c6d
commit 3b98fe7f77
1 changed files with 1 additions and 2 deletions

View File

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