Disable session management
This commit is contained in:
parent
377f478aeb
commit
095560f0be
1 changed files with 8 additions and 0 deletions
|
@ -26,6 +26,7 @@
|
|||
#include <QCommandLineParser>
|
||||
#include <QDBusMessage>
|
||||
#include <QDBusConnection>
|
||||
#include <QSessionManager>
|
||||
|
||||
#include <KDBusService>
|
||||
#include <KNotification>
|
||||
|
@ -116,6 +117,13 @@ int main(int argc, char* argv[])
|
|||
Daemon* daemon = new DesktopDaemon;
|
||||
QObject::connect(daemon, SIGNAL(destroyed(QObject*)), &app, SLOT(quit()));
|
||||
|
||||
// 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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue