@@ -24,6 +24,10 @@ QmlDownloader::~QmlDownloader()
2424 stopAria ();
2525}
2626
27+ QString QmlDownloader::newsUrl () const {
28+ return latestNewsUrl_;
29+ }
30+
2731int QmlDownloader::downloadSpeed () const {
2832 return downloadSpeed_;
2933}
@@ -44,6 +48,10 @@ int QmlDownloader::completedSize() const {
4448 return completedSize_;
4549}
4650
51+ void QmlDownloader::setNewsUrl (QString newsUrl) {
52+ latestNewsUrl_ = newsUrl;
53+ }
54+
4755void QmlDownloader::setDownloadSpeed (int speed) {
4856 downloadSpeed_ = speed;
4957 downloadTime_.addSpeed (speed);
@@ -198,17 +206,19 @@ void QmlDownloader::stopAria()
198206// Initiates an asynchronous request for the latest available versions.
199207void QmlDownloader::checkForUpdate ()
200208{
201- connect (&fetcher_, SIGNAL (onCurrentVersions (QString, QString, QString, QString)), this , SLOT (onCurrentVersions (QString, QString, QString, QString)));
209+ connect (&fetcher_, SIGNAL (onCurrentVersions (QString, QString, QString, QString, QString )), this , SLOT (onCurrentVersions (QString, QString, QString, QString, QString)));
202210 fetcher_.fetchCurrentVersion (" https://cdn.unvanquished.net/current.json" );
203211}
204212
205213// Receives the results of the checkForUpdate request.
206- void QmlDownloader::onCurrentVersions (QString updaterVersion, QString updaterUrl, QString productVersion, QString productUrl)
214+ void QmlDownloader::onCurrentVersions (QString updaterVersion, QString updaterUrl, QString productVersion, QString productUrl, QString newsUrl )
207215{
208216 latestUpdaterVersion_ = updaterVersion;
209217 latestUpdaterUrl_ = updaterUrl;
210218 latestProductVersion_ = productVersion;
211219 latestProductUrl_ = productUrl;
220+
221+ setNewsUrl (newsUrl);
212222}
213223
214224// This runs after the splash screen has been displayed for the programmed amount of time (and the
0 commit comments