LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File dont-abort-missing-display.patch of Package libqt5-qtbase-5.9.0 (Project home:jayvdb:Qt5)

From: Fabian Vogt <fabian@ritter-vogt.de>
Subject: Do not abort if no $DISPLAY available

This is annoying and also generates coredumps for no reason.

Index: qtbase-opensource-src-5.9.1/src/plugins/platforms/xcb/qxcbconnection.cpp
===================================================================
--- qtbase-opensource-src-5.9.1.orig/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ qtbase-opensource-src-5.9.1/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -571,8 +571,10 @@ QXcbConnection::QXcbConnection(QXcbNativ
     m_connection = xcb_connect(m_displayName.constData(), &m_primaryScreenNumber);
 #endif //XCB_USE_XLIB
 
-    if (Q_UNLIKELY(!m_connection || xcb_connection_has_error(m_connection)))
-        qFatal("QXcbConnection: Could not connect to display %s", m_displayName.constData());
+    if (Q_UNLIKELY(!m_connection || xcb_connection_has_error(m_connection))) {
+        qCritical("QXcbConnection: Could not connect to display %s", m_displayName.constData());
+        exit(1);
+    }
 
 
     m_reader = new QXcbEventReader(this);