Shorten setting QSessionManager restart hint

This commit is contained in:
Ilya Fedin 2023-11-27 03:45:59 +04:00 committed by John Preston
parent 87a042b029
commit 4a0ee22670
1 changed files with 2 additions and 9 deletions

View File

@ -181,16 +181,9 @@ int Sandbox::start() {
// https://github.com/telegramdesktop/tdesktop/issues/948
// and https://github.com/telegramdesktop/tdesktop/issues/5022
const auto restartHint = [](QSessionManager &manager) {
connect(this, &QGuiApplication::saveStateRequest, [](auto &manager) {
manager.setRestartHint(QSessionManager::RestartNever);
};
connect(
this,
&QGuiApplication::saveStateRequest,
this,
restartHint,
Qt::DirectConnection);
});
LOG(("Connecting local socket to %1...").arg(_localServerName));
_localSocket.connectToServer(_localServerName);