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
PIM
KAlarm
Commits
53a299c5
Commit
53a299c5
authored
Feb 25, 2022
by
Laurent Montel
😁
Browse files
Make build without texttospeech support
parent
976f825b
Pipeline
#142039
passed with stage
in 1 minute and 42 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/commandoptions.cpp
View file @
53a299c5
...
...
@@ -14,7 +14,10 @@
#include "kalarm_debug.h"
#include <KAlarmCal/Identities>
#include <kpimtextedit/kpimtextedit-texttospeech.h>
#if KPIMTEXTEDIT_TEXT_TO_SPEECH
#include <KPIMTextEdit/TextToSpeech>
#endif
#include <KLocalizedString>
#include <QCommandLineParser>
...
...
@@ -570,7 +573,11 @@ void CommandOptions::process()
{
if
(
mParser
->
isSet
(
*
mOptions
.
at
(
BEEP
)))
setErrorIncompatible
(
BEEP
,
SPEAK
);
#if KPIMTEXTEDIT_TEXT_TO_SPEECH
else
if
(
!
KPIMTextEdit
::
TextToSpeech
::
self
()
->
isReady
())
#else
else
#endif
setError
(
xi18nc
(
"@info:shell"
,
"<icode>%1</icode> requires KAlarm to be compiled with QTextToSpeech support"
,
optionName
(
SPEAK
)));
}
const
bool
onceOnly
=
mParser
->
isSet
(
*
mOptions
.
at
(
REMINDER_ONCE
));
...
...
src/messagedisplayhelper.cpp
View file @
53a299c5
...
...
@@ -21,7 +21,10 @@
#include "lib/synchtimer.h"
#include "kalarm_debug.h"
#include <kpimtextedit/kpimtextedit-texttospeech.h>
#if KPIMTEXTEDIT_TEXT_TO_SPEECH
#include <KPIMTextEdit/TextToSpeech>
#endif
#include <KLocalizedString>
#include <KConfig>
...
...
@@ -831,6 +834,7 @@ void MessageDisplayHelper::playAudio()
*/
void
MessageDisplayHelper
::
slotSpeak
()
{
#if KPIMTEXTEDIT_TEXT_TO_SPEECH
KPIMTextEdit
::
TextToSpeech
*
tts
=
KPIMTextEdit
::
TextToSpeech
::
self
();
if
(
!
tts
->
isReady
())
{
...
...
@@ -840,6 +844,7 @@ void MessageDisplayHelper::slotSpeak()
}
tts
->
say
(
mMessage
);
#endif
}
/******************************************************************************
...
...
src/prefdlg.cpp
View file @
53a299c5
...
...
@@ -48,7 +48,10 @@
#include <KHolidays/HolidayRegion>
using
namespace
KHolidays
;
#include <kpimtextedit/kpimtextedit-texttospeech.h>
#if KPIMTEXTEDIT_TEXT_TO_SPEECH
#include <KPIMTextEdit/TextToSpeech>
#endif
#include <KLocalizedString>
#include <KShell>
...
...
@@ -1355,8 +1358,10 @@ EditPrefTab::EditPrefTab(StackedScrollGroup* scrollGroup)
mSound
->
addItem
(
SoundPicker
::
i18n_combo_None
());
// index 0
mSound
->
addItem
(
SoundPicker
::
i18n_combo_Beep
());
// index 1
mSound
->
addItem
(
SoundPicker
::
i18n_combo_File
());
// index 2
#if KPIMTEXTEDIT_TEXT_TO_SPEECH
if
(
KPIMTextEdit
::
TextToSpeech
::
self
()
->
isReady
())
mSound
->
addItem
(
SoundPicker
::
i18n_combo_Speak
());
// index 3
#endif
mSound
->
setMinimumSize
(
mSound
->
sizeHint
());
mSound
->
setWhatsThis
(
defsetting
.
subs
(
SoundPicker
::
i18n_label_Sound
()).
toString
());
hlayout
->
addWidget
(
mSound
);
...
...
src/soundpicker.cpp
View file @
53a299c5
...
...
@@ -16,7 +16,10 @@
#include "lib/pushbutton.h"
#include "kalarm_debug.h"
#include <kpimtextedit/kpimtextedit-texttospeech.h>
#if KPIMTEXTEDIT_TEXT_TO_SPEECH
#include <KPIMTextEdit/TextToSpeech>
#endif
#include <KLocalizedString>
#include <phonon/backendcapabilities.h>
...
...
@@ -130,7 +133,9 @@ void SoundPicker::showFile(bool show)
*/
void
SoundPicker
::
showSpeak
(
bool
show
)
{
#if KPIMTEXTEDIT_TEXT_TO_SPEECH
if
(
!
KPIMTextEdit
::
TextToSpeech
::
self
()
->
isReady
())
#endif
show
=
false
;
// speech capability is not installed or configured
if
(
show
!=
mSpeakShowing
)
{
...
...
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