Commit 66b2b333 authored by Jeremy Whiting's avatar Jeremy Whiting
Browse files

Fix items gitlab noticed as code degradation.

Initialize TTSSystem members in initializers.
Pass voice as const & to slot.
parent b1034ab5
Pipeline #151705 skipped
......@@ -106,7 +106,7 @@ void TextToSpeechConfigurationWidget::slotTTSEngineChanged()
voiceComboBox->blockSignals(false);
}
void TextToSpeechConfigurationWidget::slotTTSVoiceChanged(QString voice)
void TextToSpeechConfigurationWidget::slotTTSVoiceChanged(const QString &voice)
{
ttsSystem->ttsVoice = voice;
}
......
......@@ -51,7 +51,7 @@ private Q_SLOTS:
void slotTTSEngineChanged();
void slotTTSVoiceChanged(QString voice);
void slotTTSVoiceChanged(const QString &voice);
private:
void buildCodecList();
......
......@@ -29,15 +29,14 @@
#include "speech.h"
TextToSpeechSystem::TextToSpeechSystem(QObject *parent)
: QObject(parent)
: QObject(parent),
codec(Speech::Local),
stdIn(true),
useQtSpeech(true),
ttsEngine(QLatin1String("speechd")),
m_speech(new QTextToSpeech(ttsEngine))
{
stdIn = true;
useQtSpeech = true;
// Default to speechd
ttsEngine = QLatin1String("speechd");
codec = Speech::Local; // local encoding;
buildCodecList();
m_speech = new QTextToSpeech(ttsEngine);
}
TextToSpeechSystem::~TextToSpeechSystem()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment