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

165ad0
From 610af8f0ba9de42cb22228e4e4b3fd77275e3e17 Mon Sep 17 00:00:00 2001
f8c1a9
From: Weng Xuetian <wengxt@gmail.com>
f8c1a9
Date: Tue, 9 Mar 2021 10:43:59 -0800
165ad0
Subject: [PATCH 01/40] 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
-- 
165ad0
2.35.1
f8c1a9