From 737770bfa4bb91ed96412d18d6490db3450bcb1c Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Fri, 6 Oct 2017 11:43:33 +0200 Subject: TextDocumentHandler to deal with HTML formatting --- framework/qml/TextEditor.qml | 2 +- framework/qml/tests/tst_texteditor.qml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'framework/qml') diff --git a/framework/qml/TextEditor.qml b/framework/qml/TextEditor.qml index 609b85db..8a5c2bb9 100644 --- a/framework/qml/TextEditor.qml +++ b/framework/qml/TextEditor.qml @@ -52,7 +52,7 @@ FocusScope { } } - Kube.DocumentHandler { + Kube.TextDocumentHandler { id: document document: edit.textDocument selectionStart: edit.selectionStart diff --git a/framework/qml/tests/tst_texteditor.qml b/framework/qml/tests/tst_texteditor.qml index 21ebe642..e6773aaa 100644 --- a/framework/qml/tests/tst_texteditor.qml +++ b/framework/qml/tests/tst_texteditor.qml @@ -40,6 +40,8 @@ TestCase { function test_2htmlConversion() { editor.htmlEnabled = true + verify(editor.text.indexOf("") !== -1) + verify(editor.text.indexOf(editor.initialText) !== -1) editor.htmlEnabled = false compare(editor.text, editor.initialText) } -- cgit v1.2.3