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

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