mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
version 0.5.5 - first release build of os x version
This commit is contained in:
@@ -183,7 +183,7 @@ void Application::updateGotCurrent() {
|
||||
if (updates.exists()) {
|
||||
QFileInfoList list = updates.entryInfoList(QDir::Files);
|
||||
for (QFileInfoList::iterator i = list.begin(), e = list.end(); i != e; ++i) {
|
||||
if (QRegularExpression("^tupdate\\d+$", QRegularExpression::CaseInsensitiveOption).match(i->fileName()).hasMatch()) {
|
||||
if (QRegularExpression("^(tupdate|tmacupd|tlinuxupd)\\d+$", QRegularExpression::CaseInsensitiveOption).match(i->fileName()).hasMatch()) {
|
||||
QFile(i->absoluteFilePath()).remove();
|
||||
}
|
||||
}
|
||||
@@ -191,6 +191,7 @@ void Application::updateGotCurrent() {
|
||||
emit updateLatest();
|
||||
}
|
||||
startUpdateCheck(true);
|
||||
App::writeConfig();
|
||||
}
|
||||
|
||||
void Application::updateFailedCurrent(QNetworkReply::NetworkError e) {
|
||||
@@ -409,16 +410,16 @@ void Application::startUpdateCheck(bool forceWait) {
|
||||
if (updates.exists()) {
|
||||
QFileInfoList list = updates.entryInfoList(QDir::Files);
|
||||
for (QFileInfoList::iterator i = list.begin(), e = list.end(); i != e; ++i) {
|
||||
if (QRegularExpression("^tupdate\\d+$", QRegularExpression::CaseInsensitiveOption).match(i->fileName()).hasMatch()) {
|
||||
if (QRegularExpression("^(tupdate|tmacupd|tlinuxupd)\\d+$", QRegularExpression::CaseInsensitiveOption).match(i->fileName()).hasMatch()) {
|
||||
sendRequest = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((cManyInstance() && !cDebug()) || cPlatform() == dbipMac) return; // only main instance is updating
|
||||
if ((cManyInstance() && !cDebug()) || cPlatform() == dbipLinux) return; // only main instance is updating
|
||||
|
||||
if (sendRequest) {
|
||||
QNetworkRequest checkVersion(QUrl(qsl("http://tdesktop.com/win/tupdates/current")));
|
||||
QNetworkRequest checkVersion(cUpdateURL());
|
||||
if (updateReply) updateReply->deleteLater();
|
||||
|
||||
App::setProxySettings(updateManager);
|
||||
|
Reference in New Issue
Block a user