Revert "Do not autostart the UI from the daemon on Windows"

This is here because the kdeconnect shortcut launches the
app, not the systray. The app launches the daemon via dbus
but without this, we don't have a systray.

Ideally the systray and daemon would be the same process.

Also ideally we would have a way to launch the daemon and
systray at boot, so people don't have to launch the app
just for the side effect of starting the daemon.

This reverts commit 1dcfaf5108.
This commit is contained in:
Albert Vaca Cintora 2023-07-11 20:41:36 +02:00
parent 5796b561bf
commit d3590c37eb

View file

@ -171,6 +171,11 @@ int main(int argc, char *argv[])
DesktopDaemon daemon; DesktopDaemon daemon;
#ifdef Q_OS_WIN
// make sure indicator shows up in the tray whenever daemon is spawned
QProcess::startDetached(QStringLiteral("kdeconnect-indicator.exe"));
#endif
// kdeconnectd is autostarted, so disable session management to speed up startup // kdeconnectd is autostarted, so disable session management to speed up startup
auto disableSessionManagement = [](QSessionManager &sm) { auto disableSessionManagement = [](QSessionManager &sm) {
sm.setRestartHint(QSessionManager::RestartNever); sm.setRestartHint(QSessionManager::RestartNever);