File ktexteditor-noqttexttospeech.patch of Package kf6-ktexteditor
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 87a9e8e89..8d983e661 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -56,7 +56,7 @@ ecm_setup_version(
set(REQUIRED_QT_VERSION 6.7.0)
# Required Qt components to build this framework
-find_package(Qt6 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Core Widgets Qml PrintSupport TextToSpeech)
+find_package(Qt6 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Core Widgets Qml PrintSupport)
# Required Frameworks
find_package(KF6Archive ${KF_DEP_VERSION} REQUIRED)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 18bb89d0b..df4d85556 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -310,7 +310,6 @@ PUBLIC
PRIVATE
Qt6::Qml
Qt6::PrintSupport
- Qt6::TextToSpeech
KF6::I18n
KF6::Archive
KF6::GuiAddons
diff --git a/src/utils/kateglobal.cpp b/src/utils/kateglobal.cpp
index 06f3d4ea3..0fdff584d 100644
--- a/src/utils/kateglobal.cpp
+++ b/src/utils/kateglobal.cpp
@@ -51,7 +51,7 @@
#include <QScrollArea>
#include <QScrollBar>
#include <QStringListModel>
-#include <QTextToSpeech>
+//#include <QTextToSpeech>
#include <QTimer>
KTextEditor::EditorPrivate::EditorPrivate(QPointer<KTextEditor::EditorPrivate> &staticInstance)
@@ -562,7 +562,7 @@ QStringList KTextEditor::EditorPrivate::emitConfigChanged()
Q_EMIT configChanged(this);
}
}
-
+#if 0
QTextToSpeech *KTextEditor::EditorPrivate::speechEngine(KTextEditor::ViewPrivate *view)
{
Q_ASSERT(view);
@@ -603,5 +603,5 @@ void KTextEditor::EditorPrivate::speechError(KTextEditor::ViewPrivate *view, con
message->setView(view);
view->document()->postMessage(message);
}
-
+#endif
#include "moc_kateglobal.cpp"
diff --git a/src/utils/kateglobal.h b/src/utils/kateglobal.h
index d9dc14a94..664eb3d7f 100644
--- a/src/utils/kateglobal.h
+++ b/src/utils/kateglobal.h
@@ -26,7 +26,7 @@
#include <memory>
class QStringListModel;
-class QTextToSpeech;
+//class QTextToSpeech;
class KateCmd;
class KateModeManager;
@@ -419,7 +419,7 @@ public:
* text to speech engine to be use by the view actions, constructed on demand.
* @param view the view that want to use it
*/
- QTextToSpeech *speechEngine(KTextEditor::ViewPrivate *view);
+// QTextToSpeech *speechEngine(KTextEditor::ViewPrivate *view);
private Q_SLOTS:
/**
@@ -431,14 +431,14 @@ private Q_SLOTS:
/**
* Was the view that started the current speak output destroyed?
*/
- void speechEngineUserDestoyed();
+// void speechEngineUserDestoyed();
/**
* Speech error occurred.
* @param view view to signal error to
* @param errorString error to show
*/
- void speechError(KTextEditor::ViewPrivate *view, const QString &errorString);
+// void speechError(KTextEditor::ViewPrivate *view, const QString &errorString);
Q_SIGNALS:
/**
@@ -581,13 +581,13 @@ private:
/**
* text to speech engine to be use by the view actions, constructed on demand
*/
- QTextToSpeech *m_speechEngine = nullptr;
+// QTextToSpeech *m_speechEngine = nullptr;
/**
* view that triggered last speech action
* used to show error messages and to stop output on view destruction
*/
- QPointer<KTextEditor::ViewPrivate> m_speechEngineLastUser;
+// QPointer<KTextEditor::ViewPrivate> m_speechEngineLastUser;
KateModelineCompletionModel *m_modelineCompletion;
};
diff --git a/src/view/kateview.cpp b/src/view/kateview.cpp
index 0f27f9b93..e10ff70db 100644
--- a/src/view/kateview.cpp
+++ b/src/view/kateview.cpp
@@ -77,7 +77,7 @@
#include <QMimeData>
#include <QPainter>
#include <QRegularExpression>
-#include <QTextToSpeech>
+//#include <QTextToSpeech>
#include <QToolTip>
// #define VIEW_RANGE_DEBUG
@@ -1026,7 +1026,7 @@ void KTextEditor::ViewPrivate::setupActions()
// widget and setting the shortcut context
setupEditActions();
setupCodeFolding();
- setupSpeechActions();
+// setupSpeechActions();
ac->addAssociatedWidget(m_viewInternal);
@@ -1455,7 +1455,7 @@ void KTextEditor::ViewPrivate::setupCodeFolding()
a->setText(i18n("Toggle Contained Nodes"));
connect(a, &QAction::triggered, this, &KTextEditor::ViewPrivate::slotToggleFoldingsInRange);
}
-
+#if 0
void KTextEditor::ViewPrivate::setupSpeechActions()
{
KActionCollection *ac = actionCollection();
@@ -1488,7 +1488,7 @@ void KTextEditor::ViewPrivate::setupSpeechActions()
KTextEditor::EditorPrivate::self()->speechEngine(this)->resume();
});
}
-
+#endif
void KTextEditor::ViewPrivate::slotFoldToplevelNodes()
{
for (int line = 0; line < doc()->lines(); ++line) {
diff --git a/src/view/kateview.h b/src/view/kateview.h
index c7022b129..aec1e5b03 100644
--- a/src/view/kateview.h
+++ b/src/view/kateview.h
@@ -863,8 +863,8 @@ private:
void setupEditActions();
KTEXTEDITOR_NO_EXPORT
void setupCodeFolding();
- KTEXTEDITOR_NO_EXPORT
- void setupSpeechActions();
+// KTEXTEDITOR_NO_EXPORT
+// void setupSpeechActions();
std::vector<QAction *> m_editActions;
QAction *m_editUndo;