summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base/ttssapi.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2020-12-05 13:14:43 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2020-12-05 13:44:37 +0100
commit0e315e848ae7ea5b226af4ab16c215119cbd3fb3 (patch)
treeeed592e48bbd636ecdc02d65f7befbf213584faf /rbutil/rbutilqt/base/ttssapi.cpp
parentac5fc26085e390cb55a3a5fd186a8091adcae2d4 (diff)
downloadrockbox-0e315e848ae7ea5b226af4ab16c215119cbd3fb3.tar.gz
rockbox-0e315e848ae7ea5b226af4ab16c215119cbd3fb3.zip
rbutil: Rework handling of available voice languages.
- Move Rockbox voice language names handling to PlayerBuildInfo, and handle it similarly to the rest of the device specific values. Rework internal handling to simplify things. - Enable language list from build server for installing prerendered voice files other than english. - Extend unit tests. Change-Id: I1a1a717fa4409fa965dabc86f52d52a4fc516315
Diffstat (limited to 'rbutil/rbutilqt/base/ttssapi.cpp')
-rw-r--r--rbutil/rbutilqt/base/ttssapi.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/rbutil/rbutilqt/base/ttssapi.cpp b/rbutil/rbutilqt/base/ttssapi.cpp
index f754f1a19b..ab972445f3 100644
--- a/rbutil/rbutilqt/base/ttssapi.cpp
+++ b/rbutil/rbutilqt/base/ttssapi.cpp
@@ -19,7 +19,7 @@
#include "ttssapi.h"
#include "utils.h"
#include "rbsettings.h"
-#include "systeminfo.h"
+#include "playerbuildinfo.h"
#include "Logger.h"
TTSSapi::TTSSapi(QObject* parent) : TTSBase(parent)
@@ -40,15 +40,12 @@ TTSBase::Capabilities TTSSapi::capabilities()
void TTSSapi::generateSettings()
{
// language
- QMap<QString, QStringList> languages = SystemInfo::languages();
- QStringList langs;
- for(int i = 0; i < languages.size(); ++i) {
- langs.append(languages.values().at(i).at(0));
- }
+ QMap<QString, QVariant> langmap = PlayerBuildInfo::instance()->value(
+ PlayerBuildInfo::LanguageList).toMap();
EncTtsSetting* setting = new EncTtsSetting(this,
EncTtsSetting::eSTRINGLIST, tr("Language:"),
RbSettings::subValue(m_TTSType, RbSettings::TtsLanguage),
- langs);
+ langmap.keys());
connect(setting,SIGNAL(dataChanged()),this,SLOT(updateVoiceList()));
insertSetting(eLANGUAGE,setting);
// voice