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
This commit is contained in:
ivan tkachenko
2023-09-19 01:37:12 +03:00
parent e2670cd6ba
commit 3084913940
3 changed files with 12 additions and 3 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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"