diff options
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r-- | src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp | 4 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection.cpp | 4 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbwindow.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp index 37f01d4eed..e1fb63fbc4 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp @@ -99,7 +99,7 @@ static Window createDummyWindow(Display *dpy, XVisualInfo *visualInfo, int scree static Window createDummyWindow(Display *dpy, GLXFBConfig config, int screenNumber, Window rootWin) { XVisualInfo *visualInfo = glXGetVisualFromFBConfig(dpy, config); - if (!visualInfo) + if (Q_UNLIKELY(!visualInfo)) qFatal("Could not initialize GLX"); Window window = createDummyWindow(dpy, visualInfo, screenNumber, rootWin); XFree(visualInfo); @@ -301,7 +301,7 @@ void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share) // Note that m_format gets updated with the used surface format visualInfo = qglx_findVisualInfo(m_display, screen->screenNumber(), &m_format); - if (!visualInfo) + if (Q_UNLIKELY(!visualInfo)) qFatal("Could not initialize GLX"); m_context = glXCreateContext(m_display, visualInfo, m_shareContext, true); if (!m_context && m_shareContext) { diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp index 50d49ca798..ff39b24e93 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection.cpp @@ -521,7 +521,7 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra m_connection = xcb_connect(m_displayName.constData(), &m_primaryScreenNumber); #endif //XCB_USE_XLIB - if (!m_connection || xcb_connection_has_error(m_connection)) + if (Q_UNLIKELY(!m_connection || xcb_connection_has_error(m_connection))) qFatal("QXcbConnection: Could not connect to display %s", m_displayName.constData()); @@ -553,7 +553,7 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra initializeXFixes(); initializeScreens(); - if (m_screens.isEmpty()) + if (Q_UNLIKELY(m_screens.isEmpty())) qFatal("QXcbConnection: no screens available"); initializeXRender(); diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index 4bd4639833..3e01a90402 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -395,7 +395,7 @@ void QXcbWindow::create() if (!visualInfo) visualInfo = static_cast<XVisualInfo *>(createVisual()); - if (!visualInfo && window()->surfaceType() == QSurface::OpenGLSurface) + if (Q_UNLIKELY(!visualInfo && window()->surfaceType() == QSurface::OpenGLSurface)) qFatal("Could not initialize OpenGL"); if (!visualInfo && window()->surfaceType() == QSurface::RasterGLSurface) { |