Rewrite kworkspace logout, shutdown and suspend API
Summary: The old code path is old and even sometimes uses the ICE protocol to start a logout from ksmserver. It's quite archaic and unreadable, KDisplayManager is even worse. The new code consists of two parts. A QML friendly front end QObject that we can register in a plugin that can trigger actions such as prompting a logout or suspending the system and a singleton that talks to the relevant backend. Backends are: * Any logind interface * Consolekit2 * Consolekit0.4 + UPower New API loading is also entirely asyncronous. There are some behavioural changes: * Creating a logout prompt is called directly instead of going via ksmserver. The prompt then calls into ksmserver when accepted * Suspend is called directly instead of going via powerdevil through some kdelibs4support solid code. All DBus calls use generated XML files, instead of big QDBusMessage commands. It's a bit overkill in terms of what we generate, but that's ready for moving SessionModel in here and killing KDisplayManager. Patch looks huge because of all the XML files, but is otherwise very simple. It is not currently an API break. Test Plan: Ran sessionstest on my logind machine A BSD user tested CK1 Reviewers: #plasma, broulik Reviewed By: #plasma, broulik Subscribers: pino, broulik, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D19389
parent
50c391cc
Please register or sign in to comment