@@ -30,7 +30,8 @@ LocalComponents.Page {
30 title: i18n.tr("Lock Screen Passcode")
30 title: i18n.tr("Lock Screen Passcode")
31 forwardButtonSourceComponent: forwardButton
31 forwardButtonSourceComponent: forwardButton
33− property alias password: passwordField.text
33+ readonly property alias password: passwordField.text
34+ readonly property alias password2: password2Field.text
35 GridLayout {
36 GridLayout {
36 id: column
37 id: column
@@ -88,6 +89,27 @@ LocalComponents.Page {
88 validator: RegExpValidator { regExp: /^\d{4}$/ }
89 validator: RegExpValidator { regExp: /^\d{4}$/ }
89 maximumLength: 4
90 maximumLength: 4
99+ visible: password && password2
103+ if (password2.length < password2Field.maximumLength)
104+ return i18n.tr("Passcode too short")
105+ else if (password == password2)
106+ return i18n.tr("Passcodes match")
108+ return i18n.tr("Passcodes do not match")
93 Item { // spacer
115 Item { // spacer
@@ -99,7 +121,7 @@ LocalComponents.Page {
99 id: forwardButton
121 id: forwardButton
100 LocalComponents.StackButton {
122 LocalComponents.StackButton {
101 text: i18n.tr("Next")
123 text: i18n.tr("Next")
102− enabled: password != "" && password == password2Field.text
124+ enabled: password != "" && password == password2
103 onClicked: {
125 onClicked: {
104 root.password = password;
126 root.password = password;
105 pageStack.next();
127 pageStack.next();