summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base/playerbuildinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt/base/playerbuildinfo.cpp')
-rw-r--r--rbutil/rbutilqt/base/playerbuildinfo.cpp25
1 files changed, 23 insertions, 2 deletions
diff --git a/rbutil/rbutilqt/base/playerbuildinfo.cpp b/rbutil/rbutilqt/base/playerbuildinfo.cpp
index f49917cfef..4310991f40 100644
--- a/rbutil/rbutilqt/base/playerbuildinfo.cpp
+++ b/rbutil/rbutilqt/base/playerbuildinfo.cpp
@@ -66,8 +66,10 @@ const static struct {
{ PlayerBuildInfo::Encoder, ":target:/encoder" },
{ PlayerBuildInfo::Brand, ":target:/brand" },
{ PlayerBuildInfo::PlayerPicture, ":target:/playerpic" },
- { PlayerBuildInfo::TargetNamesAll, "" },
- { PlayerBuildInfo::TargetNamesEnabled, "" },
+ { PlayerBuildInfo::TargetNamesAll, "_targets/all" },
+ { PlayerBuildInfo::TargetNamesEnabled, "_targets/enabled" },
+ { PlayerBuildInfo::LanguageInfo, "languages/:target:" },
+ { PlayerBuildInfo::LanguageList, "_languages/list" },
};
const static struct {
@@ -227,6 +229,25 @@ QVariant PlayerBuildInfo::value(DeviceInfo item, QString target)
result = targetNames(false);
break;
+ case LanguageList:
+ // Return a map (language, display string).
+ {
+ // need to use (QString, QVariant) here, so we can put the map into
+ // a QVariant by itself.
+ QMap<QString, QVariant> m;
+
+ playerInfo.beginGroup("languages");
+ QStringList a = playerInfo.childKeys();
+
+ for(int i = 0; i < a.size(); i++) {
+ QStringList v = playerInfo.value(a.at(i)).toStringList();
+ m[v.at(0)] = v.at(1);
+ }
+ playerInfo.endGroup();
+ result = m;
+ }
+ break;
+
default:
result = playerInfo.value(s);
break;