From 5da8b4c78ae050d0ae9612cb4cb75ac96076b63c Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Mon, 12 Nov 2018 09:58:36 +0000 Subject: [PATCH] Explicitly link and disable kcrash on kwin_wayland Summary: Kwin tried to not use kcrash by not linking against it. KIO now links against KCrash as we link against KIO we indirectly link against KCrash and thus now link and launch kcrash on wayland. This breaks coredump. Arguably it should be fixed in KIO, but it's non-trivial. The advantage of this approach is it allows us to enable drkonqi for nested mode in the future, or make a non-gui drkonqi that just saves logs. Test Plan: Compiles Reviewers: #kwin, romangg Reviewed By: #kwin, romangg Subscribers: zzag, romangg, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D16834 --- CMakeLists.txt | 2 +- main_wayland.cpp | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 367e6208fe..63b515746c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -644,7 +644,7 @@ install(TARGETS kdeinit_kwin_x11 ${INSTALL_TARGETS_DEFAULT_ARGS} ) install(TARGETS kwin_x11 ${INSTALL_TARGETS_DEFAULT_ARGS} ) add_executable(kwin_wayland tabletmodemanager.cpp main_wayland.cpp) -target_link_libraries(kwin_wayland kwin) +target_link_libraries(kwin_wayland kwin KF5::Crash) if (HAVE_LIBCAP) target_link_libraries(kwin_wayland ${Libcap_LIBRARIES}) endif() diff --git a/main_wayland.cpp b/main_wayland.cpp index 443499f347..a88896265c 100644 --- a/main_wayland.cpp +++ b/main_wayland.cpp @@ -36,6 +36,7 @@ along with this program. If not, see . #include #include #include +#include #include // Qt @@ -83,6 +84,14 @@ static void sighandler(int) QApplication::exit(); } +void disableDrKonqi() +{ + KCrash::setDrKonqiEnabled(false); +} +// run immediately, before Q_CORE_STARTUP functions +// that would enable drkonqi +Q_CONSTRUCTOR_FUNCTION(disableDrKonqi) + static void readDisplay(int pipe); enum class RealTimeFlags