@@ -69,8 +69,6 @@ Showable {
69 signal emergencyCall()
69 signal emergencyCall()
70 signal infoPopupConfirmed()
70 signal infoPopupConfirmed()
72− onActiveFocusChanged: if (activeFocus && pinPadLoader.item) pinPadLoader.item.forceActiveFocus()
74 function reset() {
72 function reset() {
75 // This causes the loader below to destry and recreate the source
73 // This causes the loader below to destry and recreate the source
76 pinPadLoader.resetting = true;
74 pinPadLoader.resetting = true;
@@ -121,108 +119,94 @@ Showable {
121 opacity: root.darkenBackground
119 opacity: root.darkenBackground
124− MouseArea {
122+ Loader {
125− anchors.fill: root
123+ id: pinPadLoader
126− onClicked: {
124+ objectName: "pinPadLoader"
127− if (pinPadLoader.item)
128− pinPadLoader.item.forceActiveFocus()
134 anchors.fill: parent
125 anchors.fill: parent
138− objectName: "pinPadLoader"
139− anchors.fill: parent
140− property bool resetting: false
126+ property bool resetting: false
141− property bool waiting: false
127+ property bool waiting: false
142− property bool showWrongText: false
128+ property bool showWrongText: false
144− source: {
131+ source: {
145− if (resetting || !root.required) {
132+ if (resetting || !root.required) {
146− return ""
133+ return ""
147− } else if (root.delayMinutes > 0) {
134+ } else if (root.delayMinutes > 0) {
148− return "DelayedLockscreen.qml"
135+ return "DelayedLockscreen.qml"
149− } else if (root.alphaNumeric) {
136+ } else if (root.alphaNumeric) {
150− return "PassphraseLockscreen.qml"
137+ return "PassphraseLockscreen.qml"
151− } else {
138+ } else {
152− return "PinLockscreen.qml"
139+ return "PinLockscreen.qml"
155− onSourceChanged: {
142+ onSourceChanged: {
156− waiting = false
143+ waiting = false
157− showWrongText = false
144+ showWrongText = false
158− if (loaderScope.activeFocus && pinPadLoader.item)
159− pinPadLoader.item.forceActiveFocus()
163− target: pinPadLoader.item
165− onEntered: {
147+ Connections {
166− pinPadLoader.waiting = true
148+ target: pinPadLoader.item
167− root.entered(passphrase);
170− onCancel: {
150+ onEntered: {
171− root.cancel()
151+ pinPadLoader.waiting = true
172− }
152+ root.entered(passphrase);
175− Binding {
155+ onCancel: {
176− target: pinPadLoader.item
156+ root.cancel()
177− property: "minPinLength"
178− value: root.minPinLength
181− target: pinPadLoader.item
182− property: "maxPinLength"
183− value: root.maxPinLength
186− target: pinPadLoader.item
187− property: "infoText"
188− value: root.infoText
191− target: pinPadLoader.item
192− property: "retryText"
193− value: root.retryText
196− target: pinPadLoader.item
197− property: "errorText"
198− value: pinPadLoader.showWrongText ? root.errorText : ""
201− target: pinPadLoader.item
202− property: "entryEnabled"
203− value: !pinPadLoader.waiting
206− target: pinPadLoader.item
207− property: "alphaNumeric"
208− value: root.alphaNumeric
211− target: pinPadLoader.item
212− property: "delayMinutes"
213− value: root.delayMinutes
216− target: pinPadLoader.item
217− property: "showCancelButton"
218− value: root.showCancelButton
221− target: pinPadLoader.item
222− property: "foregroundColor"
223− value: root.foregroundColor
161+ target: pinPadLoader.item
162+ property: "minPinLength"
163+ value: root.minPinLength
166+ target: pinPadLoader.item
167+ property: "maxPinLength"
168+ value: root.maxPinLength
171+ target: pinPadLoader.item
172+ property: "infoText"
173+ value: root.infoText
176+ target: pinPadLoader.item
177+ property: "retryText"
178+ value: root.retryText
181+ target: pinPadLoader.item
182+ property: "errorText"
183+ value: pinPadLoader.showWrongText ? root.errorText : ""
186+ target: pinPadLoader.item
187+ property: "entryEnabled"
188+ value: !pinPadLoader.waiting
191+ target: pinPadLoader.item
192+ property: "alphaNumeric"
193+ value: root.alphaNumeric
196+ target: pinPadLoader.item
197+ property: "delayMinutes"
198+ value: root.delayMinutes
201+ target: pinPadLoader.item
202+ property: "showCancelButton"
203+ value: root.showCancelButton
206+ target: pinPadLoader.item
207+ property: "foregroundColor"
208+ value: root.foregroundColor