summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/rbsettings.cpp
diff options
context:
space:
mode:
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()
{