Remove crash handling in kwin_wayland

This patch introduces additional method to Application class
that has default policy of restarting the app.
This method is overridden for wayland case disabling this step.

REVIEW: 126655
icc-effect-5.14.5
Oleg Chernovskiy 2016-01-30 14:31:28 +03:00 committed by Martin Gräßlin
parent 61e1a98fb7
commit 7ccca92c3e
4 changed files with 14 additions and 1 deletions

View File

@ -211,9 +211,14 @@ void Application::destroyAtoms()
atoms = nullptr;
}
void Application::crashChecking()
void Application::setupCrashHandler()
{
KCrash::setEmergencySaveFunction(Application::crashHandler);
}
void Application::crashChecking()
{
setupCrashHandler();
if (crashes >= 4) {
// Something has gone seriously wrong
AlternativeWMDialog dialog;

1
main.h
View File

@ -177,6 +177,7 @@ Q_SIGNALS:
protected:
Application(OperationMode mode, int &argc, char **argv);
virtual void performStartup() = 0;
virtual void setupCrashHandler();
void notifyKSplash();
void createInput();

View File

@ -122,6 +122,12 @@ void ApplicationWayland::performStartup()
createBackend();
}
void ApplicationWayland::setupCrashHandler()
{
// this disables auto-restart of kwin_wayland
// do nothing hence allowing OS to create dump and so on
}
void ApplicationWayland::createBackend()
{
AbstractBackend *backend = waylandServer()->backend();

View File

@ -56,6 +56,7 @@ public:
protected:
void performStartup() override;
void setupCrashHandler() override;
private:
void createBackend();