@@ -79,8 +79,8 @@ void QmlDownloader::onDownloadEvent(int event)
7979 }
8080 qDebug () << " Calling Sys::install" ;
8181 Sys::install ();
82- // FIXME: latestGameVersion_ could be empty if CurrentVersionFetcher didn't succeed
83- settings_.setCurrentVersion (latestGameVersion_ );
82+ // FIXME: latestProductVersion_ could be empty if CurrentVersionFetcher didn't succeed
83+ settings_.setCurrentVersion (latestProductVersion_ );
8484 settings_.setInstallFinished (true );
8585 setState (COMPLETED);
8686 setDownloadSpeed (0 );
@@ -142,7 +142,7 @@ void QmlDownloader::startUpdate()
142142
143143 worker_ = new DownloadWorker (ariaLogFilename_);
144144 worker_->setDownloadDirectory (dir.canonicalPath ().toStdString ());
145- worker_->addTorrent (" https://cdn.unvanquished.net/current.torrent " );
145+ worker_->addTorrent (latestProductUrl_. toStdString () );
146146 worker_->moveToThread (&thread_);
147147 connect (&thread_, SIGNAL (finished ()), worker_, SLOT (deleteLater ()));
148148 connect (worker_, SIGNAL (onDownloadEvent (int )), this , SLOT (onDownloadEvent (int )));
@@ -198,16 +198,17 @@ void QmlDownloader::stopAria()
198198// Initiates an asynchronous request for the latest available versions.
199199void QmlDownloader::checkForUpdate ()
200200{
201- connect (&fetcher_, SIGNAL (onCurrentVersions (QString, QString, QString)), this , SLOT (onCurrentVersions (QString, QString, QString)));
201+ connect (&fetcher_, SIGNAL (onCurrentVersions (QString, QString, QString, QString )), this , SLOT (onCurrentVersions (QString, QString, QString, QString)));
202202 fetcher_.fetchCurrentVersion (" https://cdn.unvanquished.net/current.json" );
203203}
204204
205205// Receives the results of the checkForUpdate request.
206- void QmlDownloader::onCurrentVersions (QString updaterVersion, QString updaterUrl, QString gameVersion )
206+ void QmlDownloader::onCurrentVersions (QString updaterVersion, QString updaterUrl, QString productVersion, QString productUrl )
207207{
208208 latestUpdaterVersion_ = updaterVersion;
209209 latestUpdaterUrl_ = updaterUrl;
210- latestGameVersion_ = gameVersion;
210+ latestProductVersion_ = productVersion;
211+ latestProductUrl_ = productUrl;
211212}
212213
213214// This runs after the splash screen has been displayed for the programmed amount of time (and the
@@ -233,7 +234,7 @@ void QmlDownloader::autoLaunchOrUpdate()
233234 connect (&thread_, SIGNAL (started ()), worker_, SLOT (download ()));
234235 thread_.start ();
235236 } else if (settings_.currentVersion ().isEmpty () ||
236- (!latestGameVersion_ .isEmpty () && settings_.currentVersion () != latestGameVersion_ )) {
237+ (!latestProductVersion_ .isEmpty () && settings_.currentVersion () != latestProductVersion_ )) {
237238 qDebug () << " Game update required." ;
238239 emit updateNeeded (true );
239240 } else {
0 commit comments