diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2014-10-28 13:44:45 +0100 |
---|---|---|
committer | Alex Blasche <alexander.blasche@digia.com> | 2014-10-29 15:22:37 +0100 |
commit | b9e6d2a484aea7ab8a7053adabf94780129e11e2 (patch) | |
tree | bbfa46d93c6d7b005c9b1abcaabed3966abd49d8 /examples/bluetooth/lowenergyscanner/assets | |
parent | 6d23cf4afac858aeeba3e94c4074fc50633b2b4b (diff) |
Fix lowenergyscanner ui bugs when QLEController connection errors
1.) The QLEController may error out during connectToDevice() which does
not require the eventloop to run. At the same time the services view
is not yet loaded. Subsequently the services view never notices the
errors and loads as if the controller is still trying to connect.
2.) The services view can only be left when a disconnect() signal is
received. During a connection error the disconnect never happens
because the connect never happened. Artificially introduce a disconnect()
when the controller is not connected but disconnect was called by the UI.
This part should be cleaned up to properly allow tracking of the
controller's state in the future.
Change-Id: I2cbd90d55b5e70fb275a8f4563d9436419874e6d
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'examples/bluetooth/lowenergyscanner/assets')
-rw-r--r-- | examples/bluetooth/lowenergyscanner/assets/Services.qml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/examples/bluetooth/lowenergyscanner/assets/Services.qml b/examples/bluetooth/lowenergyscanner/assets/Services.qml index e4e802d2..a433d445 100644 --- a/examples/bluetooth/lowenergyscanner/assets/Services.qml +++ b/examples/bluetooth/lowenergyscanner/assets/Services.qml @@ -45,6 +45,16 @@ Rectangle { width: 300 height: 600 + Component.onCompleted: { + // Loading this page may take longer than QLEController + // stopping with an error, go back and readjust this view + // based on controller errors + if (device.controllerError) { + info.visible = false; + menu.menuText = device.update + } + } + Header { id: header anchors.top: parent.top |