From b064a6cbb58a0db1a70fbac2e82242ce0c7509b1 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Sat, 28 Nov 2020 20:47:28 +0100 Subject: rbutil: Rework and merge player and build server info handling. Handling the data for players from rbutil.ini and the build-info data from the server is closely related. Splitting things up into different classes only creates tightly coupling, which is unnecessary, and the need to differentiate between them in the application. Merge both classes into a single one and rework handling so the application doesn't have to deal with two separate classes anymore. Furthermore, change URL templates to use new values from build-info instead of hard coding them. Change-Id: Ica550973ce23d1559110782add52bc214eba552d --- rbutil/rbutilqt/themesinstallwindow.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'rbutil/rbutilqt/themesinstallwindow.cpp') diff --git a/rbutil/rbutilqt/themesinstallwindow.cpp b/rbutil/rbutilqt/themesinstallwindow.cpp index e87d530c8c..daa910d6bf 100644 --- a/rbutil/rbutilqt/themesinstallwindow.cpp +++ b/rbutil/rbutilqt/themesinstallwindow.cpp @@ -26,7 +26,7 @@ #include "progressloggergui.h" #include "utils.h" #include "rbsettings.h" -#include "systeminfo.h" +#include "playerbuildinfo.h" #include "rockboxinfo.h" #include "version.h" #include "Logger.h" @@ -84,7 +84,7 @@ void ThemesInstallWindow::downloadInfo() LOG_INFO() << "downloading info to" << themesInfo.fileName(); themesInfo.close(); - QString infoUrl = SystemInfo::value(SystemInfo::ThemesInfoUrl).toString(); + QString infoUrl = PlayerBuildInfo::instance()->value(PlayerBuildInfo::ThemesInfoUrl).toString(); infoUrl.replace("%TARGET%", RbSettings::value(RbSettings::CurrentPlatform).toString().split(".").at(0)); infoUrl.replace("%REVISION%", installInfo.revision()); @@ -218,9 +218,9 @@ void ThemesInstallWindow::updateDetails(QListWidgetItem* cur, QListWidgetItem* p iniDetails.beginGroup(cur->data(Qt::UserRole).toString()); QUrl img, txt; - txt = QUrl(QString(SystemInfo::value(SystemInfo::ThemesUrl).toString() + "/" + txt = QUrl(QString(PlayerBuildInfo::instance()->value(PlayerBuildInfo::ThemesUrl).toString() + "/" + iniDetails.value("descriptionfile").toString())); - img = QUrl(QString(SystemInfo::value(SystemInfo::ThemesUrl).toString() + "/" + img = QUrl(QString(PlayerBuildInfo::instance()->value(PlayerBuildInfo::ThemesUrl).toString() + "/" + iniDetails.value("image").toString())); QString text; @@ -334,7 +334,7 @@ void ThemesInstallWindow::install() QSettings iniDetails(themesInfo.fileName(), QSettings::IniFormat, this); for(int i = 0; i < ui.listThemes->selectedItems().size(); i++) { iniDetails.beginGroup(ui.listThemes->selectedItems().at(i)->data(Qt::UserRole).toString()); - zip = SystemInfo::value(SystemInfo::ThemesUrl).toString() + zip = PlayerBuildInfo::instance()->value(PlayerBuildInfo::ThemesUrl).toString() + "/" + iniDetails.value("archive").toString(); themes.append(zip); names.append("Theme: " + -- cgit v1.2.3