1
0
forked from pool/libqt5-qtbase
libqt5-qtbase/dont-abort-missing-display.patch
2017-08-08 09:57:28 +00:00

23 lines
1.0 KiB
Diff

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);