summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/configure.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2020-12-04 22:35:44 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2020-12-05 11:19:32 +0100
commitac5fc26085e390cb55a3a5fd186a8091adcae2d4 (patch)
tree02bd09b3978a6345077d732f264f3d52e0845363 /rbutil/rbutilqt/configure.cpp
parentc51c6c1eb314bb0d5037f3d8f260e9657e62b2f9 (diff)
downloadrockbox-ac5fc26085.tar.gz
rockbox-ac5fc26085.tar.bz2
rockbox-ac5fc26085.zip
rbutil: Make target list part of new player info.
Also remove the unused cases. Change-Id: Ic53c12c68f9d62d9c3e4406641355893e137bcf7
Diffstat (limited to 'rbutil/rbutilqt/configure.cpp')
-rw-r--r--rbutil/rbutilqt/configure.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/rbutil/rbutilqt/configure.cpp b/rbutil/rbutilqt/configure.cpp
index 6b784a6383..721727f109 100644
--- a/rbutil/rbutilqt/configure.cpp
+++ b/rbutil/rbutilqt/configure.cpp
@@ -346,18 +346,20 @@ void Config::setDevices()
// setup devices table
LOG_INFO() << "setting up devices list";
- QStringList platformList;
+ QStringList targets;
if(ui.showDisabled->isChecked())
- platformList = SystemInfo::platforms(SystemInfo::PlatformAllDisabled);
+ targets = PlayerBuildInfo::instance()->value(
+ PlayerBuildInfo::TargetNamesAll).toStringList();
else
- platformList = SystemInfo::platforms(SystemInfo::PlatformAll);
+ targets = PlayerBuildInfo::instance()->value(
+ PlayerBuildInfo::TargetNamesEnabled).toStringList();
QMultiMap <QString, QString> manuf;
- for(int it = 0; it < platformList.size(); it++)
+ for(int it = 0; it < targets.size(); it++)
{
QString curbrand = PlayerBuildInfo::instance()->value(
- PlayerBuildInfo::Brand, platformList.at(it)).toString();
- manuf.insert(curbrand, platformList.at(it));
+ PlayerBuildInfo::Brand, targets.at(it)).toString();
+ manuf.insert(curbrand, targets.at(it));
}
// set up devices table
@@ -379,20 +381,20 @@ void Config::setDevices()
w->setText(0, brands.at(c));
items.append(w);
// go through platforms and add all players matching the current brand
- for(int it = 0; it < platformList.size(); it++) {
+ for(int it = 0; it < targets.size(); it++) {
// skip if not current brand
- if(!manuf.values(brands.at(c)).contains(platformList.at(it)))
+ if(!manuf.values(brands.at(c)).contains(targets.at(it)))
continue;
// construct display name
QString curname = QString("%1 (%2)").arg(
PlayerBuildInfo::instance()->value(PlayerBuildInfo::DisplayName,
- platformList.at(it)).toString(),
- PlayerBuildInfo::instance()->statusAsString(platformList.at(it)));
+ targets.at(it)).toString(),
+ PlayerBuildInfo::instance()->statusAsString(targets.at(it)));
LOG_INFO() << "add supported device:" << brands.at(c) << curname;
w2 = new QTreeWidgetItem(w, QStringList(curname));
- w2->setData(0, Qt::UserRole, platformList.at(it));
+ w2->setData(0, Qt::UserRole, targets.at(it));
- if(platformList.at(it) == selected) {
+ if(targets.at(it) == selected) {
w2->setSelected(true);
w->setExpanded(true);
w3 = w2; // save pointer to hilight old selection