Disable session management
This commit is contained in:
parent
9447d7e5de
commit
8da22b90ab
1 changed files with 8 additions and 0 deletions
|
@ -26,6 +26,7 @@
|
||||||
#include <QCommandLineParser>
|
#include <QCommandLineParser>
|
||||||
#include <QDBusMessage>
|
#include <QDBusMessage>
|
||||||
#include <QDBusConnection>
|
#include <QDBusConnection>
|
||||||
|
#include <QSessionManager>
|
||||||
|
|
||||||
#include <KAboutData>
|
#include <KAboutData>
|
||||||
#include <KDBusService>
|
#include <KDBusService>
|
||||||
|
@ -128,6 +129,13 @@ int main(int argc, char* argv[])
|
||||||
|
|
||||||
DesktopDaemon daemon;
|
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();
|
return app.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue