summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/rbsettings.cpp
diff options
context:
space:
mode:
authorDominik Wenger <domonoky@googlemail.com>2008-06-23 20:31:44 +0000
committerDominik Wenger <domonoky@googlemail.com>2008-06-23 20:31:44 +0000
commit6b0a1ec2a13e8a0e4f39c4957f4d64f0e0c2d8d6 (patch)
tree1cf81a90b1b5fd93c5099aa98280986123c2fcdb /rbutil/rbutilqt/rbsettings.cpp
parentd0e95cf0770af9fd034e193bd953480e8a74c6c4 (diff)
downloadrockbox-6b0a1ec2a13e8a0e4f39c4957f4d64f0e0c2d8d6.tar.gz
rockbox-6b0a1ec2a13e8a0e4f39c4957f4d64f0e0c2d8d6.tar.bz2
rockbox-6b0a1ec2a13e8a0e4f39c4957f4d64f0e0c2d8d6.zip
rbutil: warn when you install a build for a different target then already installed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17769 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/rbsettings.cpp')
-rw-r--r--rbutil/rbutilqt/rbsettings.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/rbsettings.cpp b/rbutil/rbutilqt/rbsettings.cpp
index 1bb0f73db7..889164a1c9 100644
--- a/rbutil/rbutilqt/rbsettings.cpp
+++ b/rbutil/rbutilqt/rbsettings.cpp
@@ -370,6 +370,30 @@ QString RbSettings::brand(QString plattform)
return brand;
}
+QString RbSettings::nameOfTargetId(int id)
+{
+ QString result ="";
+ // 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);
+ if(devices->value("targetid").toInt() == id)
+ {
+ result = devices->value("name").toString();
+ }
+ devices->endGroup();
+ }
+
+ return result;
+}
+
QMap<int, QString> RbSettings::usbIdMap()
{
QMap<int, QString> map;