summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2014-10-29 16:42:47 +0100
committerAlex Blasche <alexander.blasche@digia.com>2014-10-30 08:49:05 +0100
commitdaba4737a9e1c43bb6284f235428cd04e2d8b938 (patch)
tree913a8adc017ced66e0033d61a5c5eb5a207e369a /examples
parentb9e6d2a484aea7ab8a7053adabf94780129e11e2 (diff)
Force lowenergyscanner to show empty list if we did not find services
Previously the UI was only updated when a new service was discovered on a device. In the extremely rare event of no services being found the UI was hanging in the "Searching for services" view. Change-Id: I245216ac4e373a765dea2e182ab541e8830417d0 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/bluetooth/lowenergyscanner/device.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/bluetooth/lowenergyscanner/device.cpp b/examples/bluetooth/lowenergyscanner/device.cpp
index b8d61fe3..1f1e11c4 100644
--- a/examples/bluetooth/lowenergyscanner/device.cpp
+++ b/examples/bluetooth/lowenergyscanner/device.cpp
@@ -206,6 +206,9 @@ void Device::addLowEnergyService(const QBluetoothUuid &serviceUuid)
void Device::serviceScanDone()
{
setUpdate("Service scan done!");
+ // force UI in case we didn't find anything
+ if (m_services.isEmpty())
+ emit servicesUpdated();
}
void Device::connectToService(const QString &uuid)