summaryrefslogtreecommitdiffstats
path: root/examples/bluetooth/lowenergyscanner/assets/main.qml
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2014-10-28 11:42:34 +0100
committerAlex Blasche <alexander.blasche@digia.com>2014-10-28 13:51:15 +0100
commit0b42f1e6f6be36a23584dfe41acaf414023f747a (patch)
tree0edc4814ad2c4d31b12a505adfee1566279b1ca8 /examples/bluetooth/lowenergyscanner/assets/main.qml
parent4591068fe2d637b6dee7cab62e565613a8cbc91a (diff)
Fix lowenergyscanner when dealing with device scan errors
Previously the error was indicated but other UI elements were still giving the impression that the scan was ongoing. Change-Id: Iafab8f43bff3303eb6ad5e3385db2f81288d2e66 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'examples/bluetooth/lowenergyscanner/assets/main.qml')
-rw-r--r--examples/bluetooth/lowenergyscanner/assets/main.qml8
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/bluetooth/lowenergyscanner/assets/main.qml b/examples/bluetooth/lowenergyscanner/assets/main.qml
index e135d699..7f03d4fa 100644
--- a/examples/bluetooth/lowenergyscanner/assets/main.qml
+++ b/examples/bluetooth/lowenergyscanner/assets/main.qml
@@ -137,8 +137,12 @@ Rectangle {
menuText: device.update
onButtonClick: {
device.startDeviceDiscovery();
- info.dialogText = "Searching...";
- info.visible = true;}
+ // if startDeviceDiscovery() failed device.state is not set
+ if (device.state) {
+ info.dialogText = "Searching...";
+ info.visible = true;
+ }
+ }
}
Loader {