Commit 9d7d8013 authored by David Edmundson's avatar David Edmundson

Exclude kuiserver from session management

Summary: Service is DBus activated, we don't want to manually restore it.

Test Plan: Code is copied directly from plasmashell

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D19026
parent 132b85b3
......@@ -30,6 +30,7 @@
#include <kworkspace.h>
#include <QCommandLineParser>
#include <QSessionManager>
Q_LOGGING_CATEGORY(KUISERVER, "kuiserver", QtInfoMsg)
......@@ -41,6 +42,12 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
app.setApplicationVersion(QStringLiteral("2.0"));
app.setOrganizationDomain(QStringLiteral("kde.org"));
auto disableSessionManagement = [](QSessionManager &sm) {
sm.setRestartHint(QSessionManager::RestartNever);
};
QObject::connect(&app, &QGuiApplication::commitDataRequest, disableSessionManagement);
QObject::connect(&app, &QGuiApplication::saveStateRequest, disableSessionManagement);
QCommandLineParser parser;
parser.addHelpOption();
parser.addVersionOption();
......
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