diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-06-03 15:28:51 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-06-04 17:02:55 +0200 |
commit | 11a11d1280b1634628b9c4a92a0fc420ee8a3a81 (patch) | |
tree | b48d9608ef3f08123cdeea605068342131b32b44 /tests/auto/qmltest | |
parent | 52e07d564b65ed6ce26955a676c7692ad67686c1 (diff) | |
parent | fea26bb2941c3f24c4a5f3ad5efc1b85e0123ff3 (diff) |
Merge remote-tracking branch 'origin/stable' into dev
The merge conflict is about the removal of "d1" from the register
set on ARM, but that was already done in dev in commit ddb33ee9ba9e1344caa9be5dbf4b534c3ede692e
The change in src/quick/scenegraph/coreapi/qsgrenderer.cpp with commit 2414f1675eab163b22dcc4e8ded80ed04d06369b
was reverted to what it was before, per Laszlo's advice.
Conflicts:
src/qml/jit/qv4isel_masm.cpp
Change-Id: I7bce546c5cdee01e37853a476d82279d4e72948b
Diffstat (limited to 'tests/auto/qmltest')
-rw-r--r-- | tests/auto/qmltest/textinput/tst_textinput.qml | 45 |
1 files changed, 36 insertions, 9 deletions
diff --git a/tests/auto/qmltest/textinput/tst_textinput.qml b/tests/auto/qmltest/textinput/tst_textinput.qml index c359d53200..9a00ac8a60 100644 --- a/tests/auto/qmltest/textinput/tst_textinput.qml +++ b/tests/auto/qmltest/textinput/tst_textinput.qml @@ -75,6 +75,13 @@ Item { TextInput { id: txtfunctions + text: "The quick brown fox" + height: 20 + width: 50 + } + + TextInput { + id: txtclipboard text: "The quick brown fox jumped over the lazy dog" height: 20 width: 50 @@ -143,31 +150,51 @@ Item { compare(txtentry.text, "hello world") } - function test_functions() { + function test_select_insert() { compare(txtfunctions.getText(4,9), "quick") txtfunctions.select(4,9); compare(txtfunctions.selectedText, "quick") + txtfunctions.insert(4, "very ") + compare(txtfunctions.text, "The very quick brown fox") txtfunctions.deselect(); compare(txtfunctions.selectedText, "") - txtfunctions.select(4,9); - txtfunctions.cut(); - compare(txtfunctions.text, "The brown fox jumped over the lazy dog") txtfunctions.text = "Qt"; txtfunctions.insert(txtfunctions.text.length, " ") compare(txtfunctions.text, "Qt "); - txtfunctions.cursorPosition = txtfunctions.text.length; - txtfunctions.paste(); + txtfunctions.insert(txtfunctions.text.length, "quick") compare(txtfunctions.text, "Qt quick"); txtfunctions.cursorPosition = txtfunctions.text.length; txtfunctions.selectWord(); compare(txtfunctions.selectedText, "quick") - txtfunctions.copy(); txtfunctions.selectAll(); compare(txtfunctions.selectedText, "Qt quick") txtfunctions.deselect(); compare(txtfunctions.selectedText, "") - txtfunctions.paste(); - compare(txtfunctions.text, "Qt quickquick"); + } + + function test_clipboard() { + if (typeof(txtclipboard.copy) !== "function" + || typeof(txtclipboard.paste) !== "function" + || typeof(txtclipboard.cut) !== "function") { + skip("Clipboard is not supported on this platform.") + } + txtclipboard.select(4,10); + txtclipboard.cut(); + compare(txtclipboard.text, "The brown fox jumped over the lazy dog") + txtclipboard.select(30,35) + txtclipboard.paste(); + compare(txtclipboard.text, "The brown fox jumped over the quick dog") + txtclipboard.text = "Qt "; + txtclipboard.cursorPosition = txtclipboard.text.length; + txtclipboard.paste(); + compare(txtclipboard.text, "Qt quick "); + txtclipboard.cursorPosition = txtclipboard.text.length-1; + txtclipboard.selectWord(); + compare(txtclipboard.selectedText, "quick") + txtclipboard.copy(); + txtclipboard.cursorPosition = txtclipboard.text.length; + txtclipboard.paste(); + compare(txtclipboard.text, "Qt quick quick"); } function test_intvalidators_data() { |