summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/rbsettings.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2008-04-05 21:48:54 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2008-04-05 21:48:54 +0000
commit229c64ba67b2efad976417314eaef31de20af1a0 (patch)
tree645749d7996c748f68a5460b91dba349de6f8179 /rbutil/rbutilqt/rbsettings.cpp
parent00a3e13b1fb1bdcd9dd1c56ccefcbe0c9b1e13dc (diff)
downloadrockbox-229c64ba67b2efad976417314eaef31de20af1a0.tar.gz
rockbox-229c64ba67b2efad976417314eaef31de20af1a0.tar.bz2
rockbox-229c64ba67b2efad976417314eaef31de20af1a0.zip
Upon autodetection tell the user if an incompatible player model (newer Sansa / Nano) was found. Detection is usb based only.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16979 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/rbsettings.cpp')
-rw-r--r--rbutil/rbutilqt/rbsettings.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/rbsettings.cpp b/rbutil/rbutilqt/rbsettings.cpp
index fd74cbb2b5..78457809a3 100644
--- a/rbutil/rbutilqt/rbsettings.cpp
+++ b/rbutil/rbutilqt/rbsettings.cpp
@@ -461,6 +461,31 @@ QMap<int, QString> RbSettings::usbIdErrorMap()
}
+QMap<int, QString> RbSettings::usbIdIncompatMap()
+{
+
+ QMap<int, QString> map;
+ // get a list of ID -> target name
+ QStringList platforms;
+ devices->beginGroup("platforms");
+ platforms = devices->childKeys();
+ devices->endGroup();
+
+ for(int i = 0; i < platforms.size(); i++)
+ {
+ devices->beginGroup("platforms");
+ QString target = devices->value(platforms.at(i)).toString();
+ devices->endGroup();
+ devices->beginGroup(target);
+ QStringList ids = devices->value("usbincompat").toStringList();
+ int j = ids.size();
+ while(j--)
+ map.insert(ids.at(j).toInt(0, 16), target);
+ devices->endGroup();
+ }
+ return map;
+}
+
QString RbSettings::curResolution()
{