summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/base/voicefile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt/base/voicefile.cpp')
-rw-r--r--rbutil/rbutilqt/base/voicefile.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/rbutil/rbutilqt/base/voicefile.cpp b/rbutil/rbutilqt/base/voicefile.cpp
index cb9130c41a..871dd287b1 100644
--- a/rbutil/rbutilqt/base/voicefile.cpp
+++ b/rbutil/rbutilqt/base/voicefile.cpp
@@ -59,13 +59,13 @@ bool VoiceFileCreator::createVoiceFile()
59 QString features = info.features(); 59 QString features = info.features();
60 QString version = info.version(); 60 QString version = info.version();
61 m_targetid = info.targetID().toInt(); 61 m_targetid = info.targetID().toInt();
62 version = version.left(version.indexOf("-")).remove("r"); 62 m_versionstring = version.left(version.indexOf("-")).remove("r");
63 63
64 //prepare download url 64 //prepare download url
65 QString genlang = SystemInfo::value(SystemInfo::GenlangUrl).toString(); 65 QString genlang = SystemInfo::value(SystemInfo::GenlangUrl).toString();
66 genlang.replace("%LANG%", m_lang); 66 genlang.replace("%LANG%", m_lang);
67 genlang.replace("%TARGET%", target); 67 genlang.replace("%TARGET%", target);
68 genlang.replace("%REVISION%", version); 68 genlang.replace("%REVISION%", m_versionstring);
69 genlang.replace("%FEATURES%", features); 69 genlang.replace("%FEATURES%", features);
70 QUrl genlangUrl(genlang); 70 QUrl genlangUrl(genlang);
71 qDebug() << "[VoiceFileCreator] downloading " << genlangUrl; 71 qDebug() << "[VoiceFileCreator] downloading " << genlangUrl;
@@ -95,7 +95,8 @@ void VoiceFileCreator::downloadDone(bool error)
95 // update progress bar 95 // update progress bar
96 emit logProgress(1,1); 96 emit logProgress(1,1);
97 if(getter->httpResponse() != 200 && !getter->isCached()) { 97 if(getter->httpResponse() != 200 && !getter->isCached()) {
98 emit logItem(tr("Download error: received HTTP error %1.").arg(getter->httpResponse()),LOGERROR); 98 emit logItem(tr("Download error: received HTTP error %1.")
99 .arg(getter->httpResponse()),LOGERROR);
99 emit done(true); 100 emit done(true);
100 return; 101 return;
101 } 102 }
@@ -233,15 +234,14 @@ void VoiceFileCreator::downloadDone(bool error)
233 234
234 // Add Voice file to the install log 235 // Add Voice file to the install log
235 QSettings installlog(m_mountpoint + "/.rockbox/rbutil.log", QSettings::IniFormat, 0); 236 QSettings installlog(m_mountpoint + "/.rockbox/rbutil.log", QSettings::IniFormat, 0);
236 installlog.beginGroup("selfcreated Voice"); 237 installlog.beginGroup(QString("Voice (self created, %1)").arg(m_lang));
237 installlog.setValue("/.rockbox/langs/" + m_lang + ".voice", 238 installlog.setValue("/.rockbox/langs/" + m_lang + ".voice", m_versionstring);
238 QDate::currentDate().toString("yyyyMMdd"));
239 installlog.endGroup(); 239 installlog.endGroup();
240 installlog.sync(); 240 installlog.sync();
241 241
242 emit logProgress(1,1); 242 emit logProgress(1,1);
243 emit logItem(tr("successfully created."),LOGOK); 243 emit logItem(tr("successfully created."),LOGOK);
244 244
245 emit done(false); 245 emit done(false);
246} 246}
247 247