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

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