aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/localstorage
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-05-22 18:18:05 +0200
committerUlf Hermann <ulf.hermann@qt.io>2019-06-12 11:46:37 +0200
commit046279a2c99f7bb7076d0b93fae5a41aca960ec7 (patch)
tree3b355002b7f0e9014367367ffd530b6b10042e1a /examples/quick/localstorage
parent2dae14637f4efe64afa3442e229dfd95595b0540 (diff)
Register QRegularExpressionValidator in QtQuick
This should replace QRegExpValidator. RegExpValidator is deprecated now. Task-nunber: QTBUG-72588 Change-Id: I072deb382914fd322ce192509782b241824ccd7b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'examples/quick/localstorage')
-rw-r--r--examples/quick/localstorage/localstorage/Header.qml10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/quick/localstorage/localstorage/Header.qml b/examples/quick/localstorage/localstorage/Header.qml
index 18f51c1b6e..b3807f6e40 100644
--- a/examples/quick/localstorage/localstorage/Header.qml
+++ b/examples/quick/localstorage/localstorage/Header.qml
@@ -48,7 +48,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-import QtQuick 2.7
+import QtQuick 2.14
import QtQuick.Window 2.0
import QtQuick.LocalStorage 2.0
import "Database.js" as JS
@@ -143,8 +143,8 @@ Item {
font.pixelSize: 22
activeFocusOnPress: true
activeFocusOnTab: true
- validator: RegExpValidator {
- regExp: /[0-9/,:.]+/
+ validator: RegularExpressionValidator {
+ regularExpression: /[0-9/,:.]+/
}
onEditingFinished: {
if (dateInput.text == "") {
@@ -174,8 +174,8 @@ Item {
font.pixelSize: 22
activeFocusOnPress: true
activeFocusOnTab: true
- validator: RegExpValidator {
- regExp: /\d{1,3}/
+ validator: RegularExpressionValidator {
+ regularExpression: /\d{1,3}/
}
onEditingFinished: {
if (distInput.text == "") {