diff --git a/daemon/kdeconnectd.cpp b/daemon/kdeconnectd.cpp index c5ea772db..62887097e 100644 --- a/daemon/kdeconnectd.cpp +++ b/daemon/kdeconnectd.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -128,6 +129,13 @@ int main(int argc, char* argv[]) DesktopDaemon daemon; + // kdeconnectd is autostarted, so disable session management to speed up startup + auto disableSessionManagement = [](QSessionManager &sm) { + sm.setRestartHint(QSessionManager::RestartNever); + }; + QObject::connect(&app, &QGuiApplication::commitDataRequest, disableSessionManagement); + QObject::connect(&app, &QGuiApplication::saveStateRequest, disableSessionManagement); + return app.exec(); }