settings: wifi: qml: redisplay dialog on incorrect passphase 51/20751/1
authorMatt Ranostay <matt.ranostay@konsulko.com>
Thu, 28 Feb 2019 10:47:35 +0000 (02:47 -0800)
committerMatt Ranostay <matt.ranostay@konsulko.com>
Wed, 20 Mar 2019 00:35:31 +0000 (17:35 -0700)
Bug-AGL: SPEC-2183 SPEC-2271
Change-Id: Ia789a58b01d6df9e32d8f167e1f33ea19e1c37a2
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
app/wifi/Wifi.qml

index b4f4485..f183b8d 100644 (file)
@@ -99,6 +99,7 @@ SettingPage {
                 } else {
                     console.log("Connecting to ", ssid, " (", service, ")")
                     networkNameText.font.italic = 1
+                    password.text = ''
                     network.connect(service)
                 }
             }
@@ -130,8 +131,6 @@ SettingPage {
         onVisibleChanged: {
             if (visible) {
                 password.forceActiveFocus()
-            } else {
-                password.text = ''
             }
         }
 
@@ -163,7 +162,10 @@ SettingPage {
                     }
                     Button {
                         text: 'Cancel'
-                        onClicked: dialog.visible = false
+                        onClicked: {
+                                dialog.visible = false
+                                password.text = ''
+                        }
                     }
                 }
             }
@@ -184,5 +186,10 @@ SettingPage {
             password.reqid = id
             dialog.visible = true
         }
+
+        onInvalidPassphrase: {
+            console.log("Invalid passphrase for (", service, ")")
+            network.connect(service)
+        }
     }
 }