diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-03-20 00:40:44 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-03-20 00:40:44 +0000 |
commit | 4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch) | |
tree | 356496503d52354aa6d9f2d36126302fed5f3a73 /kde-apps/libksieve/files | |
parent | fcc5224904648a8e6eb528d7603154160a20022f (diff) |
gentoo resync : 20.03.2022
Diffstat (limited to 'kde-apps/libksieve/files')
-rw-r--r-- | kde-apps/libksieve/files/libksieve-21.12.3-speech-optional.patch | 180 |
1 files changed, 180 insertions, 0 deletions
diff --git a/kde-apps/libksieve/files/libksieve-21.12.3-speech-optional.patch b/kde-apps/libksieve/files/libksieve-21.12.3-speech-optional.patch new file mode 100644 index 000000000000..b77300483aa5 --- /dev/null +++ b/kde-apps/libksieve/files/libksieve-21.12.3-speech-optional.patch @@ -0,0 +1,180 @@ +From dd296ce1c679f73a52b4d501383346f51acccce8 Mon Sep 17 00:00:00 2001 +From: Laurent Montel <montel@kde.org> +Date: Sun, 23 Jan 2022 10:48:47 +0100 +Subject: [PATCH] Fix compile without texttospeech + +(cherry picked from commit 4ff666c61d4c0dde3e96ad7d45c0a81cb58324a0) + +Merged with (and stripped of Qt6 trivia): + +Text to speak is not supported yet in qt6 +(cherry picked from commit 72be23f5c355864a78174f402596d959a5ad4081) + +Fix some qt6 build +(cherry picked from commit b7acbb937cf92d41c955199c31758c5770b08f0e) + +USe upper cas includes +(cherry picked from commit 66a6cd63083a15bb570100c62053c3ac3e292642) +--- + src/ksieveui/editor/sieveeditortextmodewidget.cpp | 7 ++++++- + src/ksieveui/editor/sieveeditortextmodewidget.h | 1 + + .../sievescriptdebuggerfrontendwidgettest.cpp | 8 ++++++-- + .../sievescriptdebuggerfrontendwidget.cpp | 10 +++++++--- + src/ksieveui/templates/sievetemplateeditdialog.cpp | 11 +++++++---- + 5 files changed, 27 insertions(+), 10 deletions(-) + +diff --git a/src/ksieveui/editor/sieveeditortextmodewidget.cpp b/src/ksieveui/editor/sieveeditortextmodewidget.cpp +index d5c7c57a..0c10f9fa 100644 +--- a/src/ksieveui/editor/sieveeditortextmodewidget.cpp ++++ b/src/ksieveui/editor/sieveeditortextmodewidget.cpp +@@ -21,7 +21,9 @@ + #include <KPIMTextEdit/PlainTextEditorWidget> + #include <KPIMTextEdit/SlideContainer> + #include <KPIMTextEdit/TextGotoLineWidget> ++#if KPIMTEXTEDIT_TEXT_TO_SPEECH + #include <KPIMTextEdit/TextToSpeechWidget> ++#endif + + #include <ksieve/error.h> + #include <ksieve/parser.h> +@@ -73,9 +75,10 @@ SieveEditorTextModeWidget::SieveEditorTextModeWidget(QWidget *parent) + mTabWidget = new SieveEditorTabWidget; + connect(mTabWidget, &SieveEditorTabWidget::currentChanged, this, &SieveEditorTextModeWidget::sieveEditorTabCurrentChanged); + connect(mTabWidget, &SieveEditorTabWidget::copyAvailable, this, &SieveEditorTextModeWidget::copyAvailable); ++#if KPIMTEXTEDIT_TEXT_TO_SPEECH + mTextToSpeechWidget = new KPIMTextEdit::TextToSpeechWidget(this); + editorWidgetLayout->addWidget(mTextToSpeechWidget); +- ++#endif + mTextEdit = new SieveTextEdit; + editorWidgetLayout->addWidget(mTextEdit); + connect(mTextEdit, &SieveTextEdit::textChanged, this, &SieveEditorTextModeWidget::valueChanged); +@@ -83,7 +86,9 @@ SieveEditorTextModeWidget::SieveEditorTextModeWidget(QWidget *parent) + mTabWidget->tabBar()->hide(); + textEditLayout->addWidget(mTabWidget); + connect(mTextEdit, &SieveTextEdit::openHelp, mTabWidget, &SieveEditorTabWidget::slotAddHelpPage); ++#if KPIMTEXTEDIT_TEXT_TO_SPEECH + connect(mTextEdit, &SieveTextEdit::say, mTextToSpeechWidget, &KPIMTextEdit::TextToSpeechWidget::say); ++#endif + connect(mTextEdit, &SieveTextEdit::editRule, this, &SieveEditorTextModeWidget::slotEditRule); + connect(mTextEdit, &SieveTextEdit::insertRule, this, &SieveEditorTextModeWidget::slotInsertRule); + +diff --git a/src/ksieveui/editor/sieveeditortextmodewidget.h b/src/ksieveui/editor/sieveeditortextmodewidget.h +index 934b3d72..2ef5b824 100644 +--- a/src/ksieveui/editor/sieveeditortextmodewidget.h ++++ b/src/ksieveui/editor/sieveeditortextmodewidget.h +@@ -7,6 +7,7 @@ + + #include "ksieveui_export.h" + #include "sieveeditorabstractwidget.h" ++#include <kpimtextedit/kpimtextedit-texttospeech.h> + class QSplitter; + namespace KPIMTextEdit + { +diff --git a/src/ksieveui/sievescriptdebugger/autotests/sievescriptdebuggerfrontendwidgettest.cpp b/src/ksieveui/sievescriptdebugger/autotests/sievescriptdebuggerfrontendwidgettest.cpp +index ea66438b..28b2ba08 100644 +--- a/src/ksieveui/sievescriptdebugger/autotests/sievescriptdebuggerfrontendwidgettest.cpp ++++ b/src/ksieveui/sievescriptdebugger/autotests/sievescriptdebuggerfrontendwidgettest.cpp +@@ -6,7 +6,10 @@ + + #include "sievescriptdebuggerfrontendwidgettest.h" + #include "../sievescriptdebuggerfrontendwidget.h" +-#include <KPIMTextEdit/kpimtextedit/texttospeechwidget.h> ++#include <kpimtextedit/kpimtextedit-texttospeech.h> ++#if KPIMTEXTEDIT_TEXT_TO_SPEECH ++#include <KPIMTextEdit/TextToSpeechWidget> ++#endif + #include <KUrlRequester> + #include <QLabel> + #include <QLineEdit> +@@ -48,9 +51,10 @@ void SieveScriptDebuggerFrontEndWidgetTest::shouldHaveDefaultValue() + QVERIFY(extension); + QVERIFY(extension->text().isEmpty()); + QVERIFY(extension->isClearButtonEnabled()); +- ++#if KPIMTEXTEDIT_TEXT_TO_SPEECH + auto textToSpeechWidget = w.findChild<KPIMTextEdit::TextToSpeechWidget *>(QStringLiteral("texttospeechwidget")); + QVERIFY(textToSpeechWidget); ++#endif + } + + void SieveScriptDebuggerFrontEndWidgetTest::shouldChangeButtonEnabledState() +diff --git a/src/ksieveui/sievescriptdebugger/sievescriptdebuggerfrontendwidget.cpp b/src/ksieveui/sievescriptdebugger/sievescriptdebuggerfrontendwidget.cpp +index 4543caef..5ff016e4 100644 +--- a/src/ksieveui/sievescriptdebugger/sievescriptdebuggerfrontendwidget.cpp ++++ b/src/ksieveui/sievescriptdebugger/sievescriptdebuggerfrontendwidget.cpp +@@ -14,7 +14,10 @@ + #include <KLineEdit> + #include <KLocalizedString> + #include <KPIMTextEdit/PlainTextEditorWidget> ++#include <kpimtextedit/kpimtextedit-texttospeech.h> ++#if KPIMTEXTEDIT_TEXT_TO_SPEECH + #include <KPIMTextEdit/TextToSpeechWidget> ++#endif + #include <KUrlRequester> + #include <Libkdepim/LineEditCatchReturnKey> + #include <QDate> +@@ -71,18 +74,19 @@ SieveScriptDebuggerFrontEndWidget::SieveScriptDebuggerFrontEndWidget(QWidget *pa + auto vboxSieveEditorLayout = new QVBoxLayout; + sieveEditorWidget->setLayout(vboxSieveEditorLayout); + vboxSieveEditorLayout->setContentsMargins({}); +- ++#if KPIMTEXTEDIT_TEXT_TO_SPEECH + auto textToSpeechWidget = new KPIMTextEdit::TextToSpeechWidget(this); + textToSpeechWidget->setObjectName(QStringLiteral("texttospeechwidget")); + vboxSieveEditorLayout->addWidget(textToSpeechWidget); +- ++#endif + auto textEdit = new KSieveUi::SieveScriptDebuggerTextEdit(this); + connect(textEdit, &KSieveUi::SieveScriptDebuggerTextEdit::textChanged, this, &SieveScriptDebuggerFrontEndWidget::slotScriptTextChanged); + mSieveTextEditWidget = new KSieveUi::SieveTextEditWidget(textEdit, this); + mSieveTextEditWidget->setObjectName(QStringLiteral("sievetexteditwidget")); + vboxSieveEditorLayout->addWidget(mSieveTextEditWidget); ++#if KPIMTEXTEDIT_TEXT_TO_SPEECH + connect(mSieveTextEditWidget->textEdit(), &SieveTextEdit::say, textToSpeechWidget, &KPIMTextEdit::TextToSpeechWidget::say); +- ++#endif + mSplitter->addWidget(sieveEditorWidget); + mSplitter->setChildrenCollapsible(false); + +diff --git a/src/ksieveui/templates/sievetemplateeditdialog.cpp b/src/ksieveui/templates/sievetemplateeditdialog.cpp +index 8a7127c4..5f039f0d 100644 +--- a/src/ksieveui/templates/sievetemplateeditdialog.cpp ++++ b/src/ksieveui/templates/sievetemplateeditdialog.cpp +@@ -24,9 +24,10 @@ + #include <QVBoxLayout> + + #include <editor/sievetexteditwidget.h> +- ++#include <kpimtextedit/kpimtextedit-texttospeech.h> ++#if KPIMTEXTEDIT_TEXT_TO_SPEECH + #include <KPIMTextEdit/TextToSpeechWidget> +- ++#endif + using namespace KSieveUi; + + SieveTemplateEditDialog::SieveTemplateEditDialog(QWidget *parent, bool defaultTemplate) +@@ -62,16 +63,18 @@ SieveTemplateEditDialog::SieveTemplateEditDialog(QWidget *parent, bool defaultTe + hbox->addWidget(mTemplateNameEdit); + + vbox->addLayout(hbox); +- ++#if KPIMTEXTEDIT_TEXT_TO_SPEECH + auto textToSpeechWidget = new KPIMTextEdit::TextToSpeechWidget(this); + vbox->addWidget(textToSpeechWidget); ++#endif + + mTextEditWidget = new KSieveUi::SieveTextEditWidget; + mTextEditWidget->textEdit()->setShowHelpMenu(false); + mTextEditWidget->setReadOnly(defaultTemplate); + vbox->addWidget(mTextEditWidget); ++#if KPIMTEXTEDIT_TEXT_TO_SPEECH + connect(mTextEditWidget->textEdit(), &SieveTextEdit::say, textToSpeechWidget, &KPIMTextEdit::TextToSpeechWidget::say); +- ++#endif + auto shortcut = new QShortcut(this); + shortcut->setKey(Qt::Key_F | Qt::CTRL); + connect(shortcut, &QShortcut::activated, mTextEditWidget, &SieveTextEditWidget::slotFind); +-- +2.35.1 + |