void Application::socketError(QLocalSocket::LocalSocketError e) { if (closing) { DEBUG_LOG(("Application Error: could not write show command, error %1, quiting..").arg(e)); return App::quit(); } if (e == QLocalSocket::ServerNotFoundError) { DEBUG_LOG(("Application Info: this is the only instance of Telegram, starting server and app..")); } else { DEBUG_LOG(("Application Info: socket connect error %1, starting server and app..").arg(e)); } socket.close(); psCheckLocalSocket(serverName); if (!server.listen(serverName)) { DEBUG_LOG(("Application Error: failed to start listening to %1 server").arg(serverName)); return App::quit(); } if (!cNoStartUpdate() && psCheckReadyUpdate()) { cSetRestartingUpdate(true); DEBUG_LOG(("Application Info: installing update instead of starting app..")); return App::quit(); } startApp(); }
void UpdateBtn::onClick() { psCheckReadyUpdate(); if (App::app()->updatingState() == Application::UpdatingReady) { cSetRestartingUpdate(true); } else { cSetRestarting(true); } App::quit(); }
void SettingsInner::onRestartNow() { psCheckReadyUpdate(); if (_updatingState == UpdatingReady) { cSetRestartingUpdate(true); } else { cSetRestarting(true); } App::quit(); }
void UpdateBtn::onClick() { #ifndef TDESKTOP_DISABLE_AUTOUPDATE checkReadyUpdate(); if (Sandbox::updatingState() == Application::UpdatingReady) { cSetRestartingUpdate(true); } else #endif { cSetRestarting(true); cSetRestartingToSettings(false); } App::quit(); }