diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-10-06 11:43:33 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-10-06 11:46:58 +0200 |
commit | 737770bfa4bb91ed96412d18d6490db3450bcb1c (patch) | |
tree | 9b4bd7a6252c687b4cb5ac3d91ebe786e7891377 /framework/qml | |
parent | 41e3f3544f3ec7ae3c14f18010005e3e55c003e7 (diff) | |
download | kube-737770bfa4bb91ed96412d18d6490db3450bcb1c.tar.gz kube-737770bfa4bb91ed96412d18d6490db3450bcb1c.zip |
TextDocumentHandler to deal with HTML formatting
Diffstat (limited to 'framework/qml')
-rw-r--r-- | framework/qml/TextEditor.qml | 2 | ||||
-rw-r--r-- | framework/qml/tests/tst_texteditor.qml | 2 |
2 files changed, 3 insertions, 1 deletions
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 { | |||
52 | } | 52 | } |
53 | } | 53 | } |
54 | 54 | ||
55 | Kube.DocumentHandler { | 55 | Kube.TextDocumentHandler { |
56 | id: document | 56 | id: document |
57 | document: edit.textDocument | 57 | document: edit.textDocument |
58 | selectionStart: edit.selectionStart | 58 | 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 { | |||
40 | 40 | ||
41 | function test_2htmlConversion() { | 41 | function test_2htmlConversion() { |
42 | editor.htmlEnabled = true | 42 | editor.htmlEnabled = true |
43 | verify(editor.text.indexOf("<html>") !== -1) | ||
44 | verify(editor.text.indexOf(editor.initialText) !== -1) | ||
43 | editor.htmlEnabled = false | 45 | editor.htmlEnabled = false |
44 | compare(editor.text, editor.initialText) | 46 | compare(editor.text, editor.initialText) |
45 | } | 47 | } |