summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorUli Schlachter <psychon@znc.in>2012-01-22 21:03:12 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-23 11:02:18 +0100
commitbd2ce747fc47f16fa0ed5af452e0ce0afcf9d743 (patch)
tree600f94ac5d0def56d4b4161e9a067b0f50fb325f /src/plugins
parent07993161b1008c5baf206831c462696be3201f02 (diff)
xcb: Correctly check the X11 connection
Commit e08453f31ae2a195f86a763f0b1c5e617df0e1ce added a check which makes sure qt prints an error message instead of segfaulting when it can't connect to the X11 server. However, libxcb will never return NULL from xcb_connect() and thus that commit only works if XCB_USE_XLIB is defined and used. Change-Id: I8cc1496494a94f07055a3ac5093ce362dd347c5b Signed-off-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index d5a668af76..c77eae284b 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -132,7 +132,7 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, const char
m_connection = xcb_connect(m_displayName.constData(), &m_primaryScreen);
#endif //XCB_USE_XLIB
- if (!m_connection)
+ if (!m_connection || xcb_connection_has_error(m_connection))
qFatal("Could not connect to display %s", m_displayName.constData());
m_reader = new QXcbEventReader(this);