summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/gui
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2020-11-19 19:54:25 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2020-11-19 21:32:41 +0100
commitf608de723c863abc0e32cd7584c046eceb910d78 (patch)
tree030cf71ffd37729b189b0731bdbb70b96943a403 /rbutil/rbutilqt/gui
parentf8fb4274ee56025551ddad84232c02c2a49dfcce (diff)
downloadrockbox-f608de723c.tar.gz
rockbox-f608de723c.tar.bz2
rockbox-f608de723c.zip
rbutil: Convert ServerInfo to singleton.
Change-Id: I29d94eb6bae084754e5e3f337c41de8354ba123c
Diffstat (limited to 'rbutil/rbutilqt/gui')
-rw-r--r--rbutil/rbutilqt/gui/manualwidget.cpp10
-rw-r--r--rbutil/rbutilqt/gui/selectiveinstallwidget.cpp16
2 files changed, 13 insertions, 13 deletions
diff --git a/rbutil/rbutilqt/gui/manualwidget.cpp b/rbutil/rbutilqt/gui/manualwidget.cpp
index ba8f6f6064..c10288df10 100644
--- a/rbutil/rbutilqt/gui/manualwidget.cpp
+++ b/rbutil/rbutilqt/gui/manualwidget.cpp
@@ -42,9 +42,9 @@ void ManualWidget::updateManual()
if(!m_platform.isEmpty())
{
ui.labelPdfManual->setText(tr("<a href='%1'>PDF Manual</a>")
- .arg(ServerInfo::platformValue(ServerInfo::ManualPdfUrl, m_platform).toString()));
+ .arg(ServerInfo::instance()->platformValue(ServerInfo::ManualPdfUrl, m_platform).toString()));
ui.labelHtmlManual->setText(tr("<a href='%1'>HTML Manual (opens in browser)</a>")
- .arg(ServerInfo::platformValue(ServerInfo::ManualHtmlUrl, m_platform).toString()));
+ .arg(ServerInfo::instance()->platformValue(ServerInfo::ManualHtmlUrl, m_platform).toString()));
}
else {
ui.labelPdfManual->setText(tr("Select a device for a link to the correct manual"));
@@ -65,7 +65,7 @@ void ManualWidget::downloadManual(void)
QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) {
return;
}
- QString manual = ServerInfo::platformValue(ServerInfo::ManualPdfUrl).toString();
+ QString manual = ServerInfo::instance()->platformValue(ServerInfo::ManualPdfUrl).toString();
ProgressLoggerGui* logger = new ProgressLoggerGui(this);
logger->show();
@@ -75,12 +75,12 @@ void ManualWidget::downloadManual(void)
installer->setCache(true);
if(ui.radioPdf->isChecked()) {
- installer->setUrl(ServerInfo::platformValue(
+ installer->setUrl(ServerInfo::instance()->platformValue(
ServerInfo::ManualPdfUrl, m_platform).toString());
installer->setLogSection("Manual (PDF)");
}
else {
- installer->setUrl(ServerInfo::platformValue(
+ installer->setUrl(ServerInfo::instance()->platformValue(
ServerInfo::ManualZipUrl, m_platform).toString());
installer->setLogSection("Manual (HTML)");
}
diff --git a/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp b/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp
index f875844c9c..805a432877 100644
--- a/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp
+++ b/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp
@@ -69,7 +69,7 @@ void SelectiveInstallWidget::selectedVersionChanged(int index)
if(current == "development")
ui.selectedDescription->setText(tr("The development version is "
"updated on every code change. Last update was on %1").arg(
- ServerInfo::platformValue(ServerInfo::BleedingDate).toString()));
+ ServerInfo::instance()->platformValue(ServerInfo::BleedingDate).toString()));
if(current == "rc")
ui.selectedDescription->setText(tr("This will eventually become the "
"next Rockbox version. Install it to help testing."));
@@ -91,11 +91,11 @@ void SelectiveInstallWidget::updateVersion(void)
// re-populate all version items
m_versions.clear();
- m_versions.insert("release", ServerInfo::platformValue(ServerInfo::CurReleaseVersion).toString());
+ m_versions.insert("release", ServerInfo::instance()->platformValue(ServerInfo::CurReleaseVersion).toString());
// Don't populate RC or development selections if target has been retired.
- if (ServerInfo::platformValue(ServerInfo::CurStatus).toInt() != STATUS_RETIRED) {
- m_versions.insert("development", ServerInfo::platformValue(ServerInfo::BleedingRevision).toString());
- m_versions.insert("rc", ServerInfo::platformValue(ServerInfo::RelCandidateVersion).toString());
+ if (ServerInfo::instance()->platformValue(ServerInfo::CurStatus).toInt() != STATUS_RETIRED) {
+ m_versions.insert("development", ServerInfo::instance()->platformValue(ServerInfo::BleedingRevision).toString());
+ m_versions.insert("rc", ServerInfo::instance()->platformValue(ServerInfo::RelCandidateVersion).toString());
}
ui.selectedVersion->clear();
@@ -385,11 +385,11 @@ void SelectiveInstallWidget::installRockbox(void)
RbSettings::setValue(RbSettings::Build, selected);
RbSettings::sync();
- if(selected == "release") url = ServerInfo::platformValue(
+ if(selected == "release") url = ServerInfo::instance()->platformValue(
ServerInfo::CurReleaseUrl, m_target).toString();
- else if(selected == "development") url = ServerInfo::platformValue(
+ else if(selected == "development") url = ServerInfo::instance()->platformValue(
ServerInfo::CurDevelUrl, m_target).toString();
- else if(selected == "rc") url = ServerInfo::platformValue(
+ else if(selected == "rc") url = ServerInfo::instance()->platformValue(
ServerInfo::RelCandidateUrl, m_target).toString();
//! install build