Spellchecking with new Sonnet declarative API

This replaces all the custom code with a shared implementation
in QQC2-desktop style
This commit is contained in:
Carl Schwan
2021-08-14 20:27:11 +00:00
parent e064243d66
commit 17bbc60f6f
8 changed files with 16 additions and 595 deletions

View File

@@ -7,6 +7,7 @@ import QtQuick.Controls 2.15 as QQC2
import QtQuick.Layouts 1.15
import org.kde.kirigami 2.15 as Kirigami
import org.kde.sonnet 1.0 as Sonnet
import org.kde.neochat 1.0
import NeoChat.Settings 1.0
@@ -65,6 +66,11 @@ Kirigami.ScrollablePage {
iconName: "network-connect"
onTriggered: pageSettingStack.push("qrc:/imports/NeoChat/Page/DevicesPage.qml")
},
Kirigami.Action {
text: i18n("Spell Checking")
iconName: "tools-check-spelling"
onTriggered: pageSettingStack.push(spellCheckingPage)
},
Kirigami.Action {
text: i18n("About NeoChat")
icon.name: "help-about"
@@ -85,4 +91,11 @@ Kirigami.ScrollablePage {
aboutData: Controller.aboutData
}
}
Component {
id: spellCheckingPage
Sonnet.ConfigPage {
wideMode: pageSettingStack.wideMode
}
}
}