summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base/autodetection.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2020-11-28 20:47:28 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2020-12-03 22:25:12 +0100
commitb064a6cbb58a0db1a70fbac2e82242ce0c7509b1 (patch)
treec9090d367d237cbd408afbd24d5809e55a1a2653 /rbutil/rbutilqt/base/autodetection.cpp
parent78a01db47cac5fa67aeee6f1c5134f89c3e4944a (diff)
downloadrockbox-b064a6cbb58a0db1a70fbac2e82242ce0c7509b1.tar.gz
rockbox-b064a6cbb58a0db1a70fbac2e82242ce0c7509b1.tar.bz2
rockbox-b064a6cbb58a0db1a70fbac2e82242ce0c7509b1.zip
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/base/autodetection.cpp')
-rw-r--r--rbutil/rbutilqt/base/autodetection.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/rbutil/rbutilqt/base/autodetection.cpp b/rbutil/rbutilqt/base/autodetection.cpp
index 00918bf769..58e844b4c3 100644
--- a/rbutil/rbutilqt/base/autodetection.cpp
+++ b/rbutil/rbutilqt/base/autodetection.cpp
@@ -20,6 +20,7 @@
#include "autodetection.h"
#include "rbsettings.h"
#include "systeminfo.h"
+#include "playerbuildinfo.h"
#include "../ipodpatcher/ipodpatcher.h"
#include "../sansapatcher/sansapatcher.h"
@@ -69,7 +70,8 @@ bool Autodetection::detect(void)
}
for(int i = 0; i < m_detected.size(); ++i) {
LOG_INFO() << "Detected player:" << m_detected.at(i).device
- << "at" << m_detected.at(i).mountpoint << states[m_detected.at(i).status];
+ << "at" << m_detected.at(i).mountpoint
+ << states[m_detected.at(i).status];
}
return m_detected.size() > 0;
@@ -108,7 +110,8 @@ void Autodetection::detectUsb()
LOG_WARNING() << "[USB] detected problem with player" << d.device;
}
QString idstring = QString("%1").arg(attached.at(i), 8, 16, QChar('0'));
- if(!SystemInfo::platformValue(SystemInfo::Name, idstring).toString().isEmpty()) {
+ if(!PlayerBuildInfo::instance()->value(
+ PlayerBuildInfo::DisplayName, idstring).toString().isEmpty()) {
struct Detected d;
d.status = PlayerIncompatible;
d.device = idstring;