From 8a82faeb2837bc6e3dbff3e215c8bfd638676c8f Mon Sep 17 00:00:00 2001 From: zhongjin Date: Wed, 7 Dec 2022 14:13:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'src/GUI/UpdateChecker.cxx?= =?UTF-8?q?'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/GUI/UpdateChecker.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/GUI/UpdateChecker.cxx b/src/GUI/UpdateChecker.cxx index 335951b..8aeb21e 100644 --- a/src/GUI/UpdateChecker.cxx +++ b/src/GUI/UpdateChecker.cxx @@ -114,7 +114,7 @@ UpdateChecker::UpdateChecker(QObject *parent) : QObject(parent) _majorMinorVersion = versionParts[0] + "." + versionParts[1]; // definitiely want to ensure HTTPS for this. - std::string uri = "https://download.flightgear.org/builds/" + _majorMinorVersion + "/updates.xml"; + std::string uri = "https://download.jingweiht.com/builds/" + _majorMinorVersion + "/updates.xml"; SG_LOG(SG_IO, SG_WARN, "UpdateChecker() " << uri ); @@ -166,10 +166,11 @@ void UpdateChecker::receivedUpdateXML(QByteArray body) SG_LOG(SG_IO, SG_WARN, "UpdateChecker() " << buffer ); - const QDate n = QDate::currentDate().addDays(7); - settings.setValue("next-update-check", n); +// const QDate n = QDate::currentDate().addDays(7); +// settings.setValue("next-update-check", n); const std::string newMajorVersion = props->getStringValue("current-major-release"); + if (simgear::strutils::compare_versions(FLIGHTGEAR_VERSION, newMajorVersion) < 0) { // we have a newer version! _currentUpdateVersion = QString::fromStdString(newMajorVersion);