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/base/utils.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'rbutil/rbutilqt/base/utils.cpp') diff --git a/rbutil/rbutilqt/base/utils.cpp b/rbutil/rbutilqt/base/utils.cpp index 2f01f42e2c..3ab8aa6906 100644 --- a/rbutil/rbutilqt/base/utils.cpp +++ b/rbutil/rbutilqt/base/utils.cpp @@ -20,7 +20,7 @@ #include "rockboxinfo.h" #include "system.h" #include "rbsettings.h" -#include "systeminfo.h" +#include "playerbuildinfo.h" #include "Logger.h" #if !defined(_UNICODE) @@ -385,8 +385,10 @@ QString Utils::checkEnvironment(bool permission) { text += tr("
  • Target mismatch detected.
    " "Installed target: %1
    Selected target: %2.
  • ") - .arg(SystemInfo::platformValue(SystemInfo::Name, installed).toString(), - SystemInfo::platformValue(SystemInfo::Name).toString()); + .arg(PlayerBuildInfo::instance()->value( + PlayerBuildInfo::DisplayName, installed).toString(), + PlayerBuildInfo::instance()->value( + PlayerBuildInfo::DisplayName).toString()); } if(!text.isEmpty()) -- cgit v1.2.3