summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/base/voicefile.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2013-11-03 11:08:18 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2013-11-04 23:32:52 +0100
commit4d2ce949b3b41f8bf0af446fa20205ddd229e579 (patch)
tree01fa19471d9831b296bea5d7049f765e38b30bbb /rbutil/rbutilqt/base/voicefile.cpp
parent335ec75d60bba82f23fc47b20f9390e0cba9c9c5 (diff)
downloadrockbox-4d2ce949b3b41f8bf0af446fa20205ddd229e579.tar.gz
rockbox-4d2ce949b3b41f8bf0af446fa20205ddd229e579.zip
Use cutelogger for Rockbox Utility internal trace.
Change tracing from qDebug() to use cutelogger, which is available under the LGPL2.1. This allows to automatically add filename and line number to the log, and also provides multiple log levels. Change-Id: I5dbdaf902ba54ea99f07ae10a07467c52fdac910
Diffstat (limited to 'rbutil/rbutilqt/base/voicefile.cpp')
-rw-r--r--rbutil/rbutilqt/base/voicefile.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/rbutil/rbutilqt/base/voicefile.cpp b/rbutil/rbutilqt/base/voicefile.cpp
index 70c0f7b653..814ac538e2 100644
--- a/rbutil/rbutilqt/base/voicefile.cpp
+++ b/rbutil/rbutilqt/base/voicefile.cpp
@@ -23,6 +23,7 @@
23#include "rbsettings.h" 23#include "rbsettings.h"
24#include "systeminfo.h" 24#include "systeminfo.h"
25#include "ziputil.h" 25#include "ziputil.h"
26#include "Logger.h"
26 27
27VoiceFileCreator::VoiceFileCreator(QObject* parent) :QObject(parent) 28VoiceFileCreator::VoiceFileCreator(QObject* parent) :QObject(parent)
28{ 29{
@@ -65,7 +66,7 @@ bool VoiceFileCreator::createVoiceFile()
65 66
66 // check if voicefile is present on target 67 // check if voicefile is present on target
67 QString fn = m_mountpoint + "/.rockbox/langs/voicestrings.zip"; 68 QString fn = m_mountpoint + "/.rockbox/langs/voicestrings.zip";
68 qDebug() << "[VoiceFile] searching for zipped voicestrings at" << fn; 69 LOG_INFO() << "searching for zipped voicestrings at" << fn;
69 if(QFileInfo(fn).isFile()) { 70 if(QFileInfo(fn).isFile()) {
70 // search for binary voice strings file in archive 71 // search for binary voice strings file in archive
71 ZipUtil z(this); 72 ZipUtil z(this);
@@ -79,7 +80,7 @@ bool VoiceFileCreator::createVoiceFile()
79 } 80 }
80 } 81 }
81 if(index < contents.size()) { 82 if(index < contents.size()) {
82 qDebug() << "[VoiceFile] extracting strings file from zip"; 83 LOG_INFO() << "extracting strings file from zip";
83 // extract strings 84 // extract strings
84 QTemporaryFile stringsfile; 85 QTemporaryFile stringsfile;
85 stringsfile.open(); 86 stringsfile.open();
@@ -153,7 +154,7 @@ bool VoiceFileCreator::createVoiceFile()
153 genlang.replace("%REVISION%", version); 154 genlang.replace("%REVISION%", version);
154 genlang.replace("%FEATURES%", features); 155 genlang.replace("%FEATURES%", features);
155 QUrl genlangUrl(genlang); 156 QUrl genlangUrl(genlang);
156 qDebug() << "[VoiceFileCreator] downloading" << genlangUrl; 157 LOG_INFO() << "downloading" << genlangUrl;
157 158
158 //download the correct genlang output 159 //download the correct genlang output
159 QTemporaryFile *downloadFile = new QTemporaryFile(this); 160 QTemporaryFile *downloadFile = new QTemporaryFile(this);
@@ -175,7 +176,7 @@ bool VoiceFileCreator::createVoiceFile()
175 176
176void VoiceFileCreator::downloadDone(bool error) 177void VoiceFileCreator::downloadDone(bool error)
177{ 178{
178 qDebug() << "[VoiceFileCreator] download done, error:" << error; 179 LOG_INFO() << "download done, error:" << error;
179 180
180 // update progress bar 181 // update progress bar
181 emit logProgress(1,1); 182 emit logProgress(1,1);
@@ -253,7 +254,7 @@ void VoiceFileCreator::create(void)
253 m_talkList.append(entry); 254 m_talkList.append(entry);
254 } 255 }
255 else if(entry.toSpeak.isEmpty()) { 256 else if(entry.toSpeak.isEmpty()) {
256 qDebug() << "[Voicefile] Empty voice string for ID" << id; 257 LOG_WARNING() << "Empty voice string for ID" << id;
257 } 258 }
258 else { 259 else {
259 m_talkList.append(entry); 260 m_talkList.append(entry);
@@ -314,7 +315,7 @@ void VoiceFileCreator::create(void)
314 return; 315 return;
315 } 316 }
316 317
317 qDebug() << "[VoiceFile] Running voicefont, format" << m_voiceformat; 318 LOG_INFO() << "Running voicefont, format" << m_voiceformat;
318 voicefont(ids2,m_targetid,m_path.toLocal8Bit().data(), output, m_voiceformat); 319 voicefont(ids2,m_targetid,m_path.toLocal8Bit().data(), output, m_voiceformat);
319 // ids2 and output are closed by voicefont(). 320 // ids2 and output are closed by voicefont().
320 321