settings: wifi: qml: allow canceling of agent requests 49/20749/1
authorMatt Ranostay <matt.ranostay@konsulko.com>
Wed, 20 Mar 2019 00:28:56 +0000 (17:28 -0700)
committerMatt Ranostay <matt.ranostay@konsulko.com>
Wed, 20 Mar 2019 00:33:21 +0000 (17:33 -0700)
To cancel a passphase agent request it is needed to send a blank password
request.

Bug-AGL: SPEC-2271
Change-Id: I04da826e68b475a7d87699cfed54baaf75478786
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
app/wifi/Wifi.qml

index f183b8d..f3b6d32 100644 (file)
@@ -163,8 +163,9 @@ SettingPage {
                     Button {
                         text: 'Cancel'
                         onClicked: {
-                                dialog.visible = false
-                                password.text = ''
+                            dialog.visible = false
+                            password.text = ''
+                            network.input(password.reqid, '')
                         }
                     }
                 }
@@ -188,8 +189,10 @@ SettingPage {
         }
 
         onInvalidPassphrase: {
-            console.log("Invalid passphrase for (", service, ")")
-            network.connect(service)
+            if (password.text != '') {
+                console.log("Invalid passphrase for (", service, ")")
+                network.connect(service)
+            }
         }
     }
 }