diff options
author | Thorvald Natvig <slicer@users.sourceforge.net> | 2007-08-13 04:52:17 +0400 |
---|---|---|
committer | Thorvald Natvig <slicer@users.sourceforge.net> | 2007-08-13 04:52:17 +0400 |
commit | 1753f90918898c970a8997675b218dbadfd7c88a (patch) | |
tree | cef50152582c4862a071ee8f612665ffe6265a14 /src/mumble/TextToSpeech_unix.cpp | |
parent | d30bee2b6820408ed4a3dae07a854184dffcc0ab (diff) |
Safe HTML in Log
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@731 05730e5d-ab1b-0410-a4ac-84af385074fa
Diffstat (limited to 'src/mumble/TextToSpeech_unix.cpp')
-rw-r--r-- | src/mumble/TextToSpeech_unix.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mumble/TextToSpeech_unix.cpp b/src/mumble/TextToSpeech_unix.cpp index 98d20def2..43a0fef3d 100644 --- a/src/mumble/TextToSpeech_unix.cpp +++ b/src/mumble/TextToSpeech_unix.cpp @@ -37,7 +37,7 @@ class TextToSpeechPrivate { public: TextToSpeechPrivate(); ~TextToSpeechPrivate(); - void say(QString text); + void say(const QString &text); void setVolume(int v); }; @@ -51,10 +51,8 @@ TextToSpeechPrivate::~TextToSpeechPrivate() { qpFestival.close(); } -void TextToSpeechPrivate::say(QString text) { - QTextDocument td; - td.setHtml(text); - qpFestival.write(QString::fromLatin1("(SayText \"%1\")").arg(td.toPlainText().replace(QLatin1String("\""),QLatin1String("\\\""))).toLatin1()); +void TextToSpeechPrivate::say(const QString &text) { + qpFestival.write(QString::fromLatin1("(SayText \"%1\")").arg(text.replace(QLatin1String("\""),QLatin1String("\\\""))).toLatin1()); } void TextToSpeechPrivate::setVolume(int) { @@ -69,7 +67,7 @@ TextToSpeech::~TextToSpeech() { delete d; } -void TextToSpeech::say(QString text) { +void TextToSpeech::say(const QString &text) { if (enabled) d->say(text); } |