From 2f7cf08532db4c0c4fd119cf39343aacaeed68dd Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Sat, 2 Apr 2011 08:59:00 +0000 Subject: Use template pattern for genlang url. Instead of hard coding the query part of the genlang url store the full url as template and replace parts as done for other urls as well. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29669 a1c6a512-1295-4272-9138-f99709370657 --- rbutil/rbutilqt/base/voicefile.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'rbutil/rbutilqt/base') diff --git a/rbutil/rbutilqt/base/voicefile.cpp b/rbutil/rbutilqt/base/voicefile.cpp index a3950ca950..ce4596828f 100644 --- a/rbutil/rbutilqt/base/voicefile.cpp +++ b/rbutil/rbutilqt/base/voicefile.cpp @@ -63,9 +63,12 @@ bool VoiceFileCreator::createVoiceFile() version = version.left(version.indexOf("-")).remove("r"); //prepare download url - QUrl genlangUrl = SystemInfo::value(SystemInfo::GenlangUrl).toString() - +"?lang=" + m_lang + "&t=" + target + "&rev=" + version + "&f=" + features; - + QString genlang = SystemInfo::value(SystemInfo::GenlangUrl).toString(); + genlang.replace("%LANG%", m_lang); + genlang.replace("%TARGET%", target); + genlang.replace("%REVISION%", version); + genlang.replace("%FEATURES%", features); + QUrl genlangUrl(genlang); qDebug() << "[VoiceFileCreator] downloading " << genlangUrl; //download the correct genlang output -- cgit v1.2.3