Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Accessibility
KMouth
Commits
66b2b333
Commit
66b2b333
authored
Mar 15, 2022
by
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
Changes
3
Pipelines
6
Hide whitespace changes
Inline
Side-by-side
texttospeechconfigurationwidget.cpp
View file @
66b2b333
...
...
@@ -106,7 +106,7 @@ void TextToSpeechConfigurationWidget::slotTTSEngineChanged()
voiceComboBox
->
blockSignals
(
false
);
}
void
TextToSpeechConfigurationWidget
::
slotTTSVoiceChanged
(
QString
voice
)
void
TextToSpeechConfigurationWidget
::
slotTTSVoiceChanged
(
const
QString
&
voice
)
{
ttsSystem
->
ttsVoice
=
voice
;
}
...
...
texttospeechconfigurationwidget.h
View file @
66b2b333
...
...
@@ -51,7 +51,7 @@ private Q_SLOTS:
void
slotTTSEngineChanged
();
void
slotTTSVoiceChanged
(
QString
voice
);
void
slotTTSVoiceChanged
(
const
QString
&
voice
);
private:
void
buildCodecList
();
...
...
texttospeechsystem.cpp
View file @
66b2b333
...
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment