aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicktextinput/data
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@digia.com>2013-11-21 11:06:24 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-28 09:34:28 +0100
commit140400be0f8a8c91ce02ad5691d81d7604e5a4db (patch)
tree036bd1e1d9145ee275a9b2b5c8fc14e6c7354103 /tests/auto/quick/qquicktextinput/data
parent956ee62cc24c76569ac49ab209f5f889899c53d6 (diff)
tests: update tst_qquicktextinput
* add signal_accepted() with validator * update signal_editingfinished() with validator * cleanup many qWait() and etc Change-Id: Ic0a8f1cdc4f1f811501c06513efff9b6217fc749 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Diffstat (limited to 'tests/auto/quick/qquicktextinput/data')
-rw-r--r--tests/auto/quick/qquicktextinput/data/signal_accepted.qml14
-rw-r--r--tests/auto/quick/qquicktextinput/data/signal_editingfinished.qml14
2 files changed, 24 insertions, 4 deletions
diff --git a/tests/auto/quick/qquicktextinput/data/signal_accepted.qml b/tests/auto/quick/qquicktextinput/data/signal_accepted.qml
new file mode 100644
index 0000000000..94c113dd9f
--- /dev/null
+++ b/tests/auto/quick/qquicktextinput/data/signal_accepted.qml
@@ -0,0 +1,14 @@
+import QtQuick 2.2
+
+Item {
+ property QtObject input: input
+
+ width: 800; height: 600;
+
+ Column{
+ TextInput { id: input;
+ property bool acceptable: acceptableInput
+ validator: RegExpValidator { regExp: /[a-zA-z]{2,4}/ }
+ }
+ }
+}
diff --git a/tests/auto/quick/qquicktextinput/data/signal_editingfinished.qml b/tests/auto/quick/qquicktextinput/data/signal_editingfinished.qml
index 2ec5ce6676..dba186e765 100644
--- a/tests/auto/quick/qquicktextinput/data/signal_editingfinished.qml
+++ b/tests/auto/quick/qquicktextinput/data/signal_editingfinished.qml
@@ -1,13 +1,19 @@
import QtQuick 2.2
Item {
- property variant input1: input1
- property variant input2: input2
+ property QtObject input1: input1
+ property QtObject input2: input2
width: 800; height: 600;
Column{
- TextInput { id: input1; }
- TextInput { id: input2; }
+ TextInput { id: input1;
+ property bool acceptable: acceptableInput
+ validator: RegExpValidator { regExp: /[a-zA-z]{2,4}/ }
+ }
+ TextInput { id: input2;
+ property bool acceptable: acceptableInput
+ validator: RegExpValidator { regExp: /[a-zA-z]{2,4}/ }
+ }
}
}