From 3084913940c8e849671c4a9de4ddb93d5ad13a6f Mon Sep 17 00:00:00 2001 From: ivan tkachenko Date: Tue, 19 Sep 2023 01:37:12 +0300 Subject: [PATCH] Opt-out of Kirigami.SpellCheck when a custom QTextDocument handler is used Uses Kirigami.SpellCheck's new shorter name. See https://invent.kde.org/frameworks/kirigami/-/merge_requests/1261 --- src/qml/Component/ChatBox/ChatBar.qml | 5 ++++- src/qml/Component/Timeline/MessageEditComponent.qml | 5 ++++- src/qml/Menu/Timeline/MessageSourceSheet.qml | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/qml/Component/ChatBox/ChatBar.qml b/src/qml/Component/ChatBox/ChatBar.qml index 901e92057..2908bceee 100644 --- a/src/qml/Component/ChatBox/ChatBar.qml +++ b/src/qml/Component/ChatBox/ChatBar.qml @@ -8,7 +8,7 @@ import QtQuick.Controls 2.15 as QQC2 import QtQuick.Window 2.15 import Qt.labs.platform 1.1 as Platform -import org.kde.kirigami 2.18 as Kirigami +import org.kde.kirigami as Kirigami import org.kde.neochat 1.0 /** @@ -174,6 +174,9 @@ QQC2.Control { Accessible.description: placeholderText + // opt-out of whatever spell checker a styled TextArea might come with + Kirigami.SpellCheck.enabled: false + Timer { id: repeatTimer interval: 5000 diff --git a/src/qml/Component/Timeline/MessageEditComponent.qml b/src/qml/Component/Timeline/MessageEditComponent.qml index 471e1ac5f..c7768a73f 100644 --- a/src/qml/Component/Timeline/MessageEditComponent.qml +++ b/src/qml/Component/Timeline/MessageEditComponent.qml @@ -5,7 +5,7 @@ import QtQuick 2.15 import QtQuick.Controls 2.15 as QQC2 import QtQuick.Layouts 1.15 -import org.kde.kirigami 2.15 as Kirigami +import org.kde.kirigami as Kirigami import org.kde.neochat 1.0 QQC2.TextArea { @@ -112,6 +112,9 @@ QQC2.TextArea { } } + // opt-out of whatever spell checker a styled TextArea might come with + Kirigami.SpellCheck.enabled: false + ChatDocumentHandler { id: documentHandler isEdit: true diff --git a/src/qml/Menu/Timeline/MessageSourceSheet.qml b/src/qml/Menu/Timeline/MessageSourceSheet.qml index 9edaaaea7..35fae4200 100644 --- a/src/qml/Menu/Timeline/MessageSourceSheet.qml +++ b/src/qml/Menu/Timeline/MessageSourceSheet.qml @@ -6,7 +6,7 @@ import QtQuick 2.15 import QtQuick.Controls 2.15 as QQC2 import org.kde.syntaxhighlighting 1.0 -import org.kde.kirigami 2.15 as Kirigami +import org.kde.kirigami as Kirigami import org.kde.neochat 1.0 Kirigami.Page { @@ -38,6 +38,9 @@ Kirigami.Page { color: Kirigami.Theme.backgroundColor } + // opt-out of whatever spell checker a styled TextArea might come with + Kirigami.SpellCheck.enabled: false + SyntaxHighlighter { textEdit: sourceTextArea definition: "JSON"