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
icc-effect-5.17.5
David Edmundson 2018-11-12 09:58:36 +00:00
parent 3a75ef844e
commit 5da8b4c78a
2 changed files with 10 additions and 1 deletions

View File

@ -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()

View File

@ -36,6 +36,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KLocalizedString>
#include <KPluginLoader>
#include <KPluginMetaData>
#include <KCrash>
#include <KQuickAddons/QtQuickSettings>
// 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