Blame SOURCES/0011-Use-qWarning-and-_exit-instead-of-qFatal-for-wayland.patch

f8c1a9
From 9ee2ea141adc7765f6c212e63839ef23a4494b30 Mon Sep 17 00:00:00 2001
f8c1a9
From: Weng Xuetian <wengxt@gmail.com>
f8c1a9
Date: Tue, 9 Mar 2021 10:43:59 -0800
f8c1a9
Subject: [PATCH 11/36] Use qWarning and _exit() instead of qFatal for wayland
f8c1a9
 error
f8c1a9
f8c1a9
This type of error is likely to happen upon system logout. qFatal would
f8c1a9
trigger sigabrt and leave unnecessary coredump on the system. Using
f8c1a9
qWarning here would make it consistent with xcb's io error.
f8c1a9
f8c1a9
Pick-to: 5.15 6.0 6.1
f8c1a9
Change-Id: I571ba007bf2453486b81837cccdbefa5f181b63d
f8c1a9
Reviewed-by: David Edmundson <davidedmundson@kde.org>
f8c1a9
---
f8c1a9
 src/client/qwaylanddisplay.cpp | 5 +++--
f8c1a9
 1 file changed, 3 insertions(+), 2 deletions(-)
f8c1a9
f8c1a9
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp
f8c1a9
index fe094f6f..f10c1f79 100644
f8c1a9
--- a/src/client/qwaylanddisplay.cpp
f8c1a9
+++ b/src/client/qwaylanddisplay.cpp
f8c1a9
@@ -206,10 +206,11 @@ void QWaylandDisplay::checkError() const
f8c1a9
     int ecode = wl_display_get_error(mDisplay);
f8c1a9
     if ((ecode == EPIPE || ecode == ECONNRESET)) {
f8c1a9
         // special case this to provide a nicer error
f8c1a9
-        qFatal("The Wayland connection broke. Did the Wayland compositor die?");
f8c1a9
+        qWarning("The Wayland connection broke. Did the Wayland compositor die?");
f8c1a9
     } else {
f8c1a9
-        qFatal("The Wayland connection experienced a fatal error: %s", strerror(ecode));
f8c1a9
+        qWarning("The Wayland connection experienced a fatal error: %s", strerror(ecode));
f8c1a9
     }
f8c1a9
+    _exit(1);
f8c1a9
 }
f8c1a9
 
f8c1a9
 void QWaylandDisplay::flushRequests()
f8c1a9
-- 
f8c1a9
2.33.1
f8c1a9