Commit bf11c835 authored by Nate Graham's avatar Nate Graham
Browse files

Disable session management for daemon

We don't need to autostart the daemon if it was running at logout.

BUG: 417219
FIXED-IN: 20.12
parent 129570b1
......@@ -26,6 +26,7 @@
#include <QDBusInterface>
#include <QDBusAbstractInterface>
#include <QDBusConnectionInterface>
#include <QSessionManager>
#ifndef Q_OS_WIN
#include <unistd.h>
......@@ -132,6 +133,14 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
if (parser.isSet(QStringLiteral("daemon"))) {
// Disable session management for the daemonized version
// See
auto disableSessionManagement = [](QSessionManager &sm) {
QObject::connect(&app, &QGuiApplication::commitDataRequest, disableSessionManagement);
QObject::connect(&app, &QGuiApplication::saveStateRequest, disableSessionManagement);
KDBusService dolphinDBusService;
DBusInterface interface;
Supports Markdown
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