aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qtquick1/qdeclarativetextinput/data
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qtquick1/qdeclarativetextinput/data')
-rw-r--r--tests/auto/qtquick1/qdeclarativetextinput/data/cursorTest.qml8
-rw-r--r--tests/auto/qtquick1/qdeclarativetextinput/data/echoMode.qml11
-rw-r--r--tests/auto/qtquick1/qdeclarativetextinput/data/geometrySignals.qml12
-rw-r--r--tests/auto/qtquick1/qdeclarativetextinput/data/halign_center.pngbin0 -> 293 bytes
-rw-r--r--tests/auto/qtquick1/qdeclarativetextinput/data/halign_left.pngbin0 -> 291 bytes
-rw-r--r--tests/auto/qtquick1/qdeclarativetextinput/data/halign_right.pngbin0 -> 292 bytes
-rw-r--r--tests/auto/qtquick1/qdeclarativetextinput/data/horizontalAlignment.qml22
-rw-r--r--tests/auto/qtquick1/qdeclarativetextinput/data/horizontalAlignment_RightToLeft.qml23
-rw-r--r--tests/auto/qtquick1/qdeclarativetextinput/data/inputmethods.qml7
-rw-r--r--tests/auto/qtquick1/qdeclarativetextinput/data/masks.qml7
-rw-r--r--tests/auto/qtquick1/qdeclarativetextinput/data/maxLength.qml7
-rw-r--r--tests/auto/qtquick1/qdeclarativetextinput/data/mouseselection_default.qml7
-rw-r--r--tests/auto/qtquick1/qdeclarativetextinput/data/mouseselection_false.qml7
-rw-r--r--tests/auto/qtquick1/qdeclarativetextinput/data/mouseselection_false_readonly.qml8
-rw-r--r--tests/auto/qtquick1/qdeclarativetextinput/data/mouseselection_false_words.qml7
-rw-r--r--tests/auto/qtquick1/qdeclarativetextinput/data/mouseselection_true.qml7
-rw-r--r--tests/auto/qtquick1/qdeclarativetextinput/data/mouseselection_true_readonly.qml8
-rw-r--r--tests/auto/qtquick1/qdeclarativetextinput/data/mouseselection_true_words.qml7
-rw-r--r--tests/auto/qtquick1/qdeclarativetextinput/data/mouseselectionmode_characters.qml8
-rw-r--r--tests/auto/qtquick1/qdeclarativetextinput/data/mouseselectionmode_default.qml7
-rw-r--r--tests/auto/qtquick1/qdeclarativetextinput/data/mouseselectionmode_words.qml8
-rw-r--r--tests/auto/qtquick1/qdeclarativetextinput/data/navigation.qml24
-rw-r--r--tests/auto/qtquick1/qdeclarativetextinput/data/positionAt.qml8
-rw-r--r--tests/auto/qtquick1/qdeclarativetextinput/data/readOnly.qml12
-rw-r--r--tests/auto/qtquick1/qdeclarativetextinput/data/validators.qml22
25 files changed, 237 insertions, 0 deletions
diff --git a/tests/auto/qtquick1/qdeclarativetextinput/data/cursorTest.qml b/tests/auto/qtquick1/qdeclarativetextinput/data/cursorTest.qml
new file mode 100644
index 0000000000..73085c1749
--- /dev/null
+++ b/tests/auto/qtquick1/qdeclarativetextinput/data/cursorTest.qml
@@ -0,0 +1,8 @@
+import QtQuick 1.0
+
+Rectangle { width: 300; height: 300; color: "white"
+ TextInput { text: "Hello world!"; id: textInputObject; objectName: "textInputObject"
+ resources: [ Component { id:cursor; Item { id:cursorInstance; objectName: "cursorInstance";} } ]
+ cursorDelegate: cursor
+ }
+}
diff --git a/tests/auto/qtquick1/qdeclarativetextinput/data/echoMode.qml b/tests/auto/qtquick1/qdeclarativetextinput/data/echoMode.qml
new file mode 100644
index 0000000000..0320872b86
--- /dev/null
+++ b/tests/auto/qtquick1/qdeclarativetextinput/data/echoMode.qml
@@ -0,0 +1,11 @@
+import QtQuick 1.0
+
+Rectangle {
+ property QtObject myInput: input
+
+ width: 400; height: 200; color: "green"
+
+ TextInput { id: input; focus: true
+ text: "ABCDefgh"
+ }
+}
diff --git a/tests/auto/qtquick1/qdeclarativetextinput/data/geometrySignals.qml b/tests/auto/qtquick1/qdeclarativetextinput/data/geometrySignals.qml
new file mode 100644
index 0000000000..353d0e2f77
--- /dev/null
+++ b/tests/auto/qtquick1/qdeclarativetextinput/data/geometrySignals.qml
@@ -0,0 +1,12 @@
+import QtQuick 1.0
+
+Item {
+ width: 400; height: 500;
+ property int bindingWidth: text.width
+ property int bindingHeight: text.height
+
+ TextEdit {
+ id: text
+ anchors.fill: parent
+ }
+}
diff --git a/tests/auto/qtquick1/qdeclarativetextinput/data/halign_center.png b/tests/auto/qtquick1/qdeclarativetextinput/data/halign_center.png
new file mode 100644
index 0000000000..53e09a8e5b
--- /dev/null
+++ b/tests/auto/qtquick1/qdeclarativetextinput/data/halign_center.png
Binary files differ
diff --git a/tests/auto/qtquick1/qdeclarativetextinput/data/halign_left.png b/tests/auto/qtquick1/qdeclarativetextinput/data/halign_left.png
new file mode 100644
index 0000000000..247acbc9df
--- /dev/null
+++ b/tests/auto/qtquick1/qdeclarativetextinput/data/halign_left.png
Binary files differ
diff --git a/tests/auto/qtquick1/qdeclarativetextinput/data/halign_right.png b/tests/auto/qtquick1/qdeclarativetextinput/data/halign_right.png
new file mode 100644
index 0000000000..691bc75c89
--- /dev/null
+++ b/tests/auto/qtquick1/qdeclarativetextinput/data/halign_right.png
Binary files differ
diff --git a/tests/auto/qtquick1/qdeclarativetextinput/data/horizontalAlignment.qml b/tests/auto/qtquick1/qdeclarativetextinput/data/horizontalAlignment.qml
new file mode 100644
index 0000000000..3114c48209
--- /dev/null
+++ b/tests/auto/qtquick1/qdeclarativetextinput/data/horizontalAlignment.qml
@@ -0,0 +1,22 @@
+import QtQuick 1.0
+
+Rectangle {
+ id: top
+ width: 70; height: 70;
+
+ property alias horizontalAlignment: text.horizontalAlignment
+ property string text: "Test"
+
+ Rectangle {
+ anchors.centerIn: parent
+ width: 60
+ height: 20
+ color: "green"
+
+ TextInput {
+ id: text
+ anchors.fill: parent
+ text: top.text
+ }
+ }
+}
diff --git a/tests/auto/qtquick1/qdeclarativetextinput/data/horizontalAlignment_RightToLeft.qml b/tests/auto/qtquick1/qdeclarativetextinput/data/horizontalAlignment_RightToLeft.qml
new file mode 100644
index 0000000000..b11535e50b
--- /dev/null
+++ b/tests/auto/qtquick1/qdeclarativetextinput/data/horizontalAlignment_RightToLeft.qml
@@ -0,0 +1,23 @@
+import QtQuick 1.0
+
+Rectangle {
+ id: top
+ width: 200; height: 70;
+
+ property alias horizontalAlignment: text.horizontalAlignment
+ property string text: "اختبا"
+
+ Rectangle {
+ anchors.centerIn: parent
+ width: 180
+ height: 20
+ color: "green"
+
+ TextInput {
+ id: text
+ objectName: "text"
+ anchors.fill: parent
+ text: top.text
+ }
+ }
+}
diff --git a/tests/auto/qtquick1/qdeclarativetextinput/data/inputmethods.qml b/tests/auto/qtquick1/qdeclarativetextinput/data/inputmethods.qml
new file mode 100644
index 0000000000..5063892306
--- /dev/null
+++ b/tests/auto/qtquick1/qdeclarativetextinput/data/inputmethods.qml
@@ -0,0 +1,7 @@
+import QtQuick 1.0
+
+TextInput {
+ text: "Hello world!"
+ inputMethodHints: Qt.ImhNoPredictiveText
+ Keys.onLeftPressed: {}
+}
diff --git a/tests/auto/qtquick1/qdeclarativetextinput/data/masks.qml b/tests/auto/qtquick1/qdeclarativetextinput/data/masks.qml
new file mode 100644
index 0000000000..c75764af91
--- /dev/null
+++ b/tests/auto/qtquick1/qdeclarativetextinput/data/masks.qml
@@ -0,0 +1,7 @@
+import QtQuick 1.0
+
+TextInput{
+ focus: true
+ objectName: "myInput"
+ inputMask: "HHHHhhhh; "
+}
diff --git a/tests/auto/qtquick1/qdeclarativetextinput/data/maxLength.qml b/tests/auto/qtquick1/qdeclarativetextinput/data/maxLength.qml
new file mode 100644
index 0000000000..95902bb687
--- /dev/null
+++ b/tests/auto/qtquick1/qdeclarativetextinput/data/maxLength.qml
@@ -0,0 +1,7 @@
+import QtQuick 1.0
+
+TextInput{
+ focus: true
+ objectName: "myInput"
+ maximumLength: 10
+}
diff --git a/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselection_default.qml b/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselection_default.qml
new file mode 100644
index 0000000000..eea83ed035
--- /dev/null
+++ b/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselection_default.qml
@@ -0,0 +1,7 @@
+import QtQuick 1.0
+
+TextInput {
+ focus: true
+ text: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ selectByMouse: false
+}
diff --git a/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselection_false.qml b/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselection_false.qml
new file mode 100644
index 0000000000..eea83ed035
--- /dev/null
+++ b/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselection_false.qml
@@ -0,0 +1,7 @@
+import QtQuick 1.0
+
+TextInput {
+ focus: true
+ text: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ selectByMouse: false
+}
diff --git a/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselection_false_readonly.qml b/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselection_false_readonly.qml
new file mode 100644
index 0000000000..36a95634e3
--- /dev/null
+++ b/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselection_false_readonly.qml
@@ -0,0 +1,8 @@
+import QtQuick 1.0
+
+TextInput {
+ focus: true
+ text: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ selectByMouse: false
+ readOnly: true
+}
diff --git a/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselection_false_words.qml b/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselection_false_words.qml
new file mode 100644
index 0000000000..eea83ed035
--- /dev/null
+++ b/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselection_false_words.qml
@@ -0,0 +1,7 @@
+import QtQuick 1.0
+
+TextInput {
+ focus: true
+ text: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ selectByMouse: false
+}
diff --git a/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselection_true.qml b/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselection_true.qml
new file mode 100644
index 0000000000..8115ba05e3
--- /dev/null
+++ b/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselection_true.qml
@@ -0,0 +1,7 @@
+import QtQuick 1.0
+
+TextInput {
+ focus: true
+ text: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ selectByMouse: true
+}
diff --git a/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselection_true_readonly.qml b/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselection_true_readonly.qml
new file mode 100644
index 0000000000..678a89aa8b
--- /dev/null
+++ b/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselection_true_readonly.qml
@@ -0,0 +1,8 @@
+import QtQuick 1.0
+
+TextInput {
+ focus: true
+ text: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ selectByMouse: true
+ readOnly: true
+}
diff --git a/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselection_true_words.qml b/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselection_true_words.qml
new file mode 100644
index 0000000000..8115ba05e3
--- /dev/null
+++ b/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselection_true_words.qml
@@ -0,0 +1,7 @@
+import QtQuick 1.0
+
+TextInput {
+ focus: true
+ text: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ selectByMouse: true
+}
diff --git a/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselectionmode_characters.qml b/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselectionmode_characters.qml
new file mode 100644
index 0000000000..0ffc6ff225
--- /dev/null
+++ b/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselectionmode_characters.qml
@@ -0,0 +1,8 @@
+import QtQuick 1.1
+
+TextInput {
+ focus: true
+ text: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ selectByMouse: true
+ mouseSelectionMode: TextInput.SelectCharacters
+}
diff --git a/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselectionmode_default.qml b/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselectionmode_default.qml
new file mode 100644
index 0000000000..87c174be14
--- /dev/null
+++ b/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselectionmode_default.qml
@@ -0,0 +1,7 @@
+import QtQuick 1.1
+
+TextInput {
+ focus: true
+ text: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ selectByMouse: true
+}
diff --git a/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselectionmode_words.qml b/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselectionmode_words.qml
new file mode 100644
index 0000000000..df69a7d042
--- /dev/null
+++ b/tests/auto/qtquick1/qdeclarativetextinput/data/mouseselectionmode_words.qml
@@ -0,0 +1,8 @@
+import QtQuick 1.1
+
+TextInput {
+ focus: true
+ text: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ selectByMouse: true
+ mouseSelectionMode: TextInput.SelectWords
+}
diff --git a/tests/auto/qtquick1/qdeclarativetextinput/data/navigation.qml b/tests/auto/qtquick1/qdeclarativetextinput/data/navigation.qml
new file mode 100644
index 0000000000..af1b14090e
--- /dev/null
+++ b/tests/auto/qtquick1/qdeclarativetextinput/data/navigation.qml
@@ -0,0 +1,24 @@
+import QtQuick 1.0
+
+Rectangle {
+ property variant myInput: input
+
+ width: 800; height: 600; color: "blue"
+
+ Item {
+ id: firstItem;
+ KeyNavigation.right: input
+ }
+
+ TextInput { id: input; focus: true
+ text: "Needs some text"
+ KeyNavigation.left: firstItem
+ KeyNavigation.right: lastItem
+ KeyNavigation.up: firstItem
+ KeyNavigation.down: lastItem
+ }
+ Item {
+ id: lastItem
+ KeyNavigation.left: input
+ }
+}
diff --git a/tests/auto/qtquick1/qdeclarativetextinput/data/positionAt.qml b/tests/auto/qtquick1/qdeclarativetextinput/data/positionAt.qml
new file mode 100644
index 0000000000..cbbf33d9fd
--- /dev/null
+++ b/tests/auto/qtquick1/qdeclarativetextinput/data/positionAt.qml
@@ -0,0 +1,8 @@
+import QtQuick 1.0
+
+TextInput{
+ focus: true
+ objectName: "myInput"
+ width: 50
+ text: "This is a long piece of text"
+}
diff --git a/tests/auto/qtquick1/qdeclarativetextinput/data/readOnly.qml b/tests/auto/qtquick1/qdeclarativetextinput/data/readOnly.qml
new file mode 100644
index 0000000000..f173649ef5
--- /dev/null
+++ b/tests/auto/qtquick1/qdeclarativetextinput/data/readOnly.qml
@@ -0,0 +1,12 @@
+import QtQuick 1.0
+
+Rectangle {
+ property variant myInput: input
+
+ width: 800; height: 600; color: "blue"
+
+ TextInput { id: input; focus: true
+ readOnly: true
+ text: "I am the very model of a modern major general.\n"
+ }
+}
diff --git a/tests/auto/qtquick1/qdeclarativetextinput/data/validators.qml b/tests/auto/qtquick1/qdeclarativetextinput/data/validators.qml
new file mode 100644
index 0000000000..e26bcb30e6
--- /dev/null
+++ b/tests/auto/qtquick1/qdeclarativetextinput/data/validators.qml
@@ -0,0 +1,22 @@
+import QtQuick 1.0
+
+Item {
+ property variant intInput: intInput
+ property variant dblInput: dblInput
+ property variant strInput: strInput
+
+ width: 800; height: 600;
+
+ Column{
+ TextInput { id: intInput;
+ validator: IntValidator{top: 11; bottom: 2}
+ }
+ TextInput { id: dblInput;
+ validator: DoubleValidator{top: 12.12; bottom: 2.93; decimals: 2; notation: DoubleValidator.StandardNotation}
+ }
+ TextInput { id: strInput;
+ validator: RegExpValidator { regExp: /[a-zA-z]{2,4}/ }
+ }
+ }
+
+}