diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-11-28 20:47:28 +0100 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-12-03 22:25:12 +0100 |
commit | b064a6cbb58a0db1a70fbac2e82242ce0c7509b1 (patch) | |
tree | c9090d367d237cbd408afbd24d5809e55a1a2653 /rbutil/rbutilqt/themesinstallwindow.cpp | |
parent | 78a01db47cac5fa67aeee6f1c5134f89c3e4944a (diff) |
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
Diffstat (limited to 'rbutil/rbutilqt/themesinstallwindow.cpp')
-rw-r--r-- | rbutil/rbutilqt/themesinstallwindow.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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: " + |