mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 05:28:09 +08:00
refs #600, turned CUrlList into a plain vanilla list
* bundled all load balancing in CFailoverUrlList. "Obtain" functions are non-const, no need of mutable members
This commit is contained in:
committed by
Mathew Sutcliffe
parent
89d9b3ad39
commit
1a1e4681fe
@@ -134,8 +134,8 @@ void CSwiftLauncher::initStyleSheet()
|
||||
void CSwiftLauncher::displayLatestNews()
|
||||
{
|
||||
#ifndef Q_CC_MINGW
|
||||
CUrlList newsUrls(this->m_setup.get().swiftLatestNewsUrls());
|
||||
QUrl newUrl(newsUrls.getNextUrl());
|
||||
CFailoverUrlList newsUrls(this->m_setup.get().swiftLatestNewsUrls());
|
||||
QUrl newUrl(newsUrls.obtainNextWorkingUrl());
|
||||
|
||||
Q_UNUSED(newUrl);
|
||||
/** Qt bug
|
||||
@@ -299,7 +299,7 @@ void CSwiftLauncher::ps_loadedSetup(bool success)
|
||||
|
||||
CUpdateInfo updateInfo(this->m_updateInfo.get());
|
||||
QString latestVersion(updateInfo.getLatestVersion()) ; // need to get this from somewhere
|
||||
CUrlList downloadUrls(updateInfo.getDownloadUrls());
|
||||
CFailoverUrlList downloadUrls(updateInfo.getDownloadUrls());
|
||||
bool newVersionAvailable = CProject::isNewerVersion(latestVersion) && !downloadUrls.isEmpty();
|
||||
this->ui->wi_NewVersionAvailable->setVisible(newVersionAvailable);
|
||||
this->ui->wi_NoNewVersion->setVisible(!newVersionAvailable);
|
||||
@@ -307,7 +307,7 @@ void CSwiftLauncher::ps_loadedSetup(bool success)
|
||||
|
||||
if (!downloadUrls.isEmpty())
|
||||
{
|
||||
CUrl downloadUrl(downloadUrls.getNextUrl());
|
||||
CUrl downloadUrl(downloadUrls.obtainNextUrl());
|
||||
QString urlStr(downloadUrl.toQString());
|
||||
QString hl("<a href=\"%1\">%2 %3</a>");
|
||||
this->ui->lbl_NewVersionUrl->setText(hl.arg(urlStr).arg(urlStr).arg(latestVersion));
|
||||
|
||||
Reference in New Issue
Block a user