Unverified Commit 610a9ea2 authored by Andreas Sturmlechner's avatar Andreas Sturmlechner
Browse files

Fix build without texttospeech


Signed-off-by: default avatarAndreas Sturmlechner <asturm@gentoo.org>
parent 49aa0675
Pipeline #141872 passed with stage
in 2 minutes and 43 seconds
......@@ -13,7 +13,7 @@
#include "urlhandler/webengine/urlhandlerwebengine.h"
#include "webengine/urlhandlerwebenginemanager.h"
#include <kpimtextedit/kpimtextedit-texttospeech.h>
#ifdef KPIMTEXTEDIT_TEXT_TO_SPEECH
#if KPIMTEXTEDIT_TEXT_TO_SPEECH
#include <KPIMTextEdit/TextToSpeech>
#endif
#include <WebEngineViewer/InterceptorManager>
......@@ -308,7 +308,7 @@ void ArticleViewerWebEngine::slotWebHitFinished(const WebEngineViewer::WebHitTes
popup.addAction(ActionManager::getInstance()->action(QStringLiteral("tab_unmute")));
popup.addSeparator();
popup.addAction(ActionManager::getInstance()->action(QStringLiteral("find_in_messages")));
#ifdef KPIMTEXTEDIT_TEXT_TO_SPEECH
#if KPIMTEXTEDIT_TEXT_TO_SPEECH
if (KPIMTextEdit::TextToSpeech::self()->isReady()) {
popup.addSeparator();
popup.addAction(ActionManager::getInstance()->action(QStringLiteral("speak_text")));
......
......@@ -12,7 +12,7 @@
#include <KLocalizedString>
#include <MessageViewer/ViewerPluginToolManager>
#include <QVBoxLayout>
#ifdef KPIMTEXTEDIT_TEXT_TO_SPEECH
#if KPIMTEXTEDIT_TEXT_TO_SPEECH
#include <kpimtextedit/texttospeechwidget.h>
#endif
#include <KPIMTextEdit/SlideContainer>
......@@ -45,7 +45,7 @@ template<typename Arg, typename R, typename C> InvokeWrapper<Arg, R, C> invoke(R
ArticleViewerWebEngineWidgetNg::ArticleViewerWebEngineWidgetNg(ArticleViewerWebEngine *customViewer, KActionCollection *ac, QWidget *parent)
: QWidget(parent)
, mArticleViewerNg(customViewer)
#ifdef KPIMTEXTEDIT_TEXT_TO_SPEECH
#if KPIMTEXTEDIT_TEXT_TO_SPEECH
, mTextToSpeechWidget(new KPIMTextEdit::TextToSpeechWidget(this))
#endif
, mSliderContainer(new KPIMTextEdit::SlideContainer(this))
......@@ -64,7 +64,7 @@ void ArticleViewerWebEngineWidgetNg::initializeLayout(KActionCollection *ac)
{
auto layout = new QVBoxLayout(this);
layout->setContentsMargins({});
#ifdef KPIMTEXTEDIT_TEXT_TO_SPEECH
#if KPIMTEXTEDIT_TEXT_TO_SPEECH
mTextToSpeechWidget->setObjectName(QStringLiteral("texttospeechwidget"));
layout->addWidget(mTextToSpeechWidget);
#endif
......@@ -109,7 +109,7 @@ void ArticleViewerWebEngineWidgetNg::slotFind()
void ArticleViewerWebEngineWidgetNg::slotSpeakText()
{
const QString text = mArticleViewerNg->selectedText();
#ifdef KPIMTEXTEDIT_TEXT_TO_SPEECH
#if KPIMTEXTEDIT_TEXT_TO_SPEECH
mTextToSpeechWidget->say(text);
#endif
}
......
......@@ -57,7 +57,7 @@ private:
void printRequested(QWebEnginePage *page);
WebEngineViewer::FindBarWebEngineView *mFindBarWebView = nullptr;
ArticleViewerWebEngine *mArticleViewerNg = nullptr;
#ifdef KPIMTEXTEDIT_TEXT_TO_SPEECH
#if KPIMTEXTEDIT_TEXT_TO_SPEECH
KPIMTextEdit::TextToSpeechWidget *const mTextToSpeechWidget;
#endif
KPIMTextEdit::SlideContainer *const mSliderContainer;
......
......@@ -16,7 +16,7 @@
#include <KActionMenu>
#include <KIO/KUriFilterSearchProviderActions>
#include <kpimtextedit/kpimtextedit-texttospeech.h>
#ifdef KPIMTEXTEDIT_TEXT_TO_SPEECH
#if KPIMTEXTEDIT_TEXT_TO_SPEECH
#include <KPIMTextEdit/TextToSpeech>
#endif
#include <QContextMenuEvent>
......@@ -141,7 +141,7 @@ void AkrWebEngineViewer::slotWebHitFinished(const WebEngineViewer::WebHitTestRes
popup.addActions(interceptorUrlActions);
}
popup.addSeparator();
#ifdef KPIMTEXTEDIT_TEXT_TO_SPEECH
#if KPIMTEXTEDIT_TEXT_TO_SPEECH
popup.addAction(ActionManager::getInstance()->action(QStringLiteral("find_in_messages")));
if (KPIMTextEdit::TextToSpeech::self()->isReady()) {
popup.addSeparator();
......
Supports Markdown
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