summaryrefslogtreecommitdiff
path: root/tests/auto/controls
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/controls')
-rw-r--r--tests/auto/controls/data/tst_combobox.qml6
-rw-r--r--tests/auto/controls/data/tst_textfield.qml2
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/controls/data/tst_combobox.qml b/tests/auto/controls/data/tst_combobox.qml
index bccac8d2..01ebbf79 100644
--- a/tests/auto/controls/data/tst_combobox.qml
+++ b/tests/auto/controls/data/tst_combobox.qml
@@ -155,12 +155,12 @@ TestCase {
}
function test_validator() {
- var comboBox = Qt.createQmlObject('import QtQuick 2.2; \
+ var comboBox = Qt.createQmlObject('import QtQuick 2.14; \
import QtQuick.Controls 1.2; \
ComboBox { \
editable: true; \
- validator: RegExpValidator { \
- regExp: /(red|blue|green)?/ \
+ validator: RegularExpressionValidator { \
+ regularExpression: /(red|blue|green)?/ \
}}', testCase, '')
comboBox.editText = "blu"
diff --git a/tests/auto/controls/data/tst_textfield.qml b/tests/auto/controls/data/tst_textfield.qml
index 64b3fad0..111d01b4 100644
--- a/tests/auto/controls/data/tst_textfield.qml
+++ b/tests/auto/controls/data/tst_textfield.qml
@@ -141,7 +141,7 @@ TestCase {
}
function test_validator() {
- var textfield = Qt.createQmlObject('import QtQuick 2.2; import QtQuick.Controls 1.2; TextField {validator: RegExpValidator { regExp: /(red|blue|green)?/; }}', testCase, '')
+ var textfield = Qt.createQmlObject('import QtQuick 2.14; import QtQuick.Controls 1.2; TextField {validator: RegularExpressionValidator { regularExpression: /(red|blue|green)?/; }}', testCase, '')
textfield.text = "blu"
compare(textfield.acceptableInput, false)