rbutil: Add voice installation to main widget.

Add checkbox for installing the prerendered voice file to the main
install widget. Current limitations:
- only english for now. The available languages are available from the
  build server but are not yet taken into account.
- only for releases. This is the same limitations we had before. We do
  have voices for daily builds, but that requires adding daily builds
  again (those have been removed some time back.)
- Old voice installation dialog still present.

Change-Id: Ia6443b0f15365196df86cc1b64d5e043dff70c4c
This commit is contained in:
Dominik Riebeling 2020-11-21 19:33:29 +01:00
parent ad37655687
commit c2dacf6736
9 changed files with 210 additions and 99 deletions

View file

@ -159,7 +159,7 @@ QStringList SystemInfo::platforms(enum SystemInfo::PlatformType type, QString va
return result;
}
QMap<QString, QStringList> SystemInfo::languages(void)
QMap<QString, QStringList> SystemInfo::languages(bool namesOnly)
{
ensureSystemInfoExists();
@ -168,7 +168,11 @@ QMap<QString, QStringList> SystemInfo::languages(void)
QStringList a = systemInfos->childKeys();
for(int i = 0; i < a.size(); i++)
{
result.insert(a.at(i), systemInfos->value(a.at(i), "null").toStringList());
QStringList data = systemInfos->value(a.at(i), "null").toStringList();
if(namesOnly)
result.insert(data.at(0), QStringList(data.at(1)));
else
result.insert(a.at(i), data);
}
systemInfos->endGroup();
return result;