Commit 67e7dc8f authored by Jeremy Whiting's avatar Jeremy Whiting Committed by Oliver Sander

Fix building okular without QTextToSpeech by adding ifdefs.

Also hide speech box in gui if built without tts features.
parent ef52350f
Pipeline #8778 passed with stage
in 12 minutes and 28 seconds
......@@ -13,7 +13,9 @@
#include "settings.h"
#include <QtTextToSpeech>
DlgAccessibility::DlgAccessibility( QWidget * parent )
: QWidget( parent ), m_selected( 0 )
......@@ -32,12 +34,16 @@ DlgAccessibility::DlgAccessibility( QWidget * parent )
m_color_pages[ m_selected ]->show();
// Populate tts engines
const QStringList engines = QTextToSpeech::availableEngines();
for (const QString &engine: engines) {
m_dlg->kcfg_ttsEngine->addItem (engine);
m_dlg->kcfg_ttsEngine->setProperty("kcfg_property", QByteArray("currentText"));
connect(m_dlg->kcfg_RenderMode, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &DlgAccessibility::slotColorMode);
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