summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base/ttsexes.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/ttsexes.cpp
parent335ec75d60bba82f23fc47b20f9390e0cba9c9c5 (diff)
downloadrockbox-4d2ce949b3b41f8bf0af446fa20205ddd229e579.tar.gz
rockbox-4d2ce949b3b41f8bf0af446fa20205ddd229e579.tar.bz2
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/ttsexes.cpp')
-rw-r--r--rbutil/rbutilqt/base/ttsexes.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/rbutil/rbutilqt/base/ttsexes.cpp b/rbutil/rbutilqt/base/ttsexes.cpp
index 348db103bc..a8c10bfb19 100644
--- a/rbutil/rbutilqt/base/ttsexes.cpp
+++ b/rbutil/rbutilqt/base/ttsexes.cpp
@@ -20,6 +20,7 @@
#include "ttsexes.h"
#include "utils.h"
#include "rbsettings.h"
+#include "Logger.h"
TTSExes::TTSExes(QObject* parent) : TTSBase(parent)
{
@@ -85,15 +86,15 @@ TTSStatus TTSExes::voice(QString text, QString wavfile, QString *errStr)
QString execstring;
if(wavfile.isEmpty() && m_capabilities & TTSBase::CanSpeak) {
if(m_TTSSpeakTemplate.isEmpty()) {
- qDebug() << "[TTSExes] internal error: TTS announces CanSpeak "
- "but template empty!";
+ LOG_ERROR() << "internal error: TTS announces CanSpeak "
+ "but template empty!";
return FatalError;
}
execstring = m_TTSSpeakTemplate;
}
else if(wavfile.isEmpty()) {
- qDebug() << "[TTSExes] no output file passed to voice() "
- "but TTS can't speak directly.";
+ LOG_ERROR() << "no output file passed to voice() "
+ "but TTS can't speak directly.";
return FatalError;
}
else {
@@ -108,7 +109,7 @@ TTSStatus TTSExes::voice(QString text, QString wavfile, QString *errStr)
QProcess::execute(execstring);
if(!wavfile.isEmpty() && !QFileInfo(wavfile).isFile()) {
- qDebug() << "[TTSExes] output file does not exist:" << wavfile;
+ LOG_ERROR() << "output file does not exist:" << wavfile;
return FatalError;
}
return NoError;