aboutsummaryrefslogtreecommitdiffstats
path: root/tests/testapplications
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-03-17 16:36:08 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-03-18 16:02:36 +0100
commit7230005ef66f22a7ee3addff95b1e8d9060dc5a1 (patch)
treea08ff3fce798fc1fb88809083efb4070cbc4d091 /tests/testapplications
parentc5b48c735e1c26444e53c4ea7dc6df4c57b5e9b4 (diff)
Remove QRegExpValidator usages
This also means the RegExpValidator QML type will be gone. Use QRegularExpressionValidator instead. [ChangeLog][QtQuick][RegExpValidator] The RegExpValidator QML type has been removed. Use RegularExpressionValidator instead. Change-Id: If25fc5a258a669dfd28e705271757caa252ce05c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/testapplications')
-rw-r--r--tests/testapplications/elements/content/RegExpValidatorElement.qml8
-rw-r--r--tests/testapplications/text/textinput.qml6
2 files changed, 7 insertions, 7 deletions
diff --git a/tests/testapplications/elements/content/RegExpValidatorElement.qml b/tests/testapplications/elements/content/RegExpValidatorElement.qml
index 5cc77f8f3d..f4bada9f94 100644
--- a/tests/testapplications/elements/content/RegExpValidatorElement.qml
+++ b/tests/testapplications/elements/content/RegExpValidatorElement.qml
@@ -26,7 +26,7 @@
**
****************************************************************************/
-import QtQuick 2.0
+import QtQuick 2.14
Item {
id: regexpvalidatorelementtest
@@ -34,7 +34,7 @@ Item {
property string testtext: ""
property variant regexp: /[a-z]{3}/
- RegExpValidator { id: regexpvalidatorelement; regExp: regexp }
+ RegularExpressionValidator { id: regexpvalidatorelement; regularExpression: regexp }
Rectangle {
id: regexpvalidatorelementbackground
@@ -67,8 +67,8 @@ Item {
State { name: "start"; when: statenum == 1
PropertyChanges { target: regexpvalidatorelementinput; text: "abc" }
PropertyChanges { target: regexpvalidatorelementtest
- testtext: "This is a TextInput element using an RegExpValidator for input masking. At present it should be indicating abc.\n"+
- "The regExp value will only match to a value that has three alpha characters\n"+
+ testtext: "This is a TextInput element using an RegularExpressionValidator for input masking. At present it should be indicating abc.\n"+
+ "The regularExpression value will only match to a value that has three alpha characters\n"+
"Next, let's attempt to enter text that does not match the regular expression: 123" }
},
State { name: "notmatch"; when: statenum == 2
diff --git a/tests/testapplications/text/textinput.qml b/tests/testapplications/text/textinput.qml
index 72e6d83931..d0dacfc033 100644
--- a/tests/testapplications/text/textinput.qml
+++ b/tests/testapplications/text/textinput.qml
@@ -26,7 +26,7 @@
**
****************************************************************************/
-import QtQuick 2.0
+import QtQuick 2.14
import QtQml.Models 2.12
Rectangle {
@@ -81,8 +81,8 @@ Rectangle {
}
IntValidator { id: intval; top: 30; bottom: 12 }
DoubleValidator { id: dubval; top: 30; bottom: 12 }
- RegExpValidator { id: regval; regExp: /Qt/ }
- RegExpValidator { id: noval; regExp: /.*/ }
+ RegularExpressionValidator { id: regval; regularExpression: /Qt/ }
+ RegularExpressionValidator { id: noval; regularExpression: /.*/ }
Rectangle{ color: "transparent"; border.color: "green"; anchors.fill: parent }
}