Commit b8a44a4c authored by David Edmundson's avatar David Edmundson

Exclude powerdevil from session management

Summary:
I found this process in my ksmserverrc

This is autostarted through other ways, and there's no useful data that
should persist across sessions.

Test Plan: Code is copy pasted

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: broulik, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D19024
parent f9dda0cc
......@@ -33,6 +33,7 @@
#include <QFileInfo>
#include <QAction>
#include <QKeySequence>
#include <QSessionManager>
#include <KCrash>
#include <KDBusService>
......@@ -200,6 +201,12 @@ int main(int argc, char **argv)
KWorkSpace::detectPlatform(argc, argv);
PowerDevilApp app(argc, argv);
auto disableSessionManagement = [](QSessionManager &sm) {
sm.setRestartHint(QSessionManager::RestartNever);
};
QObject::connect(&app, &QGuiApplication::commitDataRequest, disableSessionManagement);
QObject::connect(&app, &QGuiApplication::saveStateRequest, disableSessionManagement);
KDBusService service(KDBusService::Unique);
KCrash::setFlags(KCrash::AutoRestart);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment