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

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