diff options
author | Andreas Buhr <andreas@andreasbuhr.de> | 2021-03-18 09:57:18 +0100 |
---|---|---|
committer | Andreas Buhr <andreas.buhr@qt.io> | 2021-04-08 16:57:19 +0200 |
commit | 62cc018b3cad685414b50a9c489d3dc9e45970e7 (patch) | |
tree | e05232b34aab869dbf4c3e65c1b21aa2d62a9964 /examples/bluetooth/heartrate-game | |
parent | 2dab70c2ec3675f767cd37f196fdc14d078e649c (diff) |
Change QLowEnergyService::ServiceState enum to reflect future changes
In the future, discoverDetails() should become optional.
The state of a QLowEnergyService after its creation should have
a name which does not imply it is not functional yet. This patch
changes the name of the initial state from "DiscoveryRequired"
to the neutral "RemoteService".
Task-number: QTBUG-75340
Change-Id: Ib407e60f5fc7264a04a124561dacbcebb01bf252
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'examples/bluetooth/heartrate-game')
-rw-r--r-- | examples/bluetooth/heartrate-game/devicehandler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/bluetooth/heartrate-game/devicehandler.cpp b/examples/bluetooth/heartrate-game/devicehandler.cpp index 16e94577..cf7020f6 100644 --- a/examples/bluetooth/heartrate-game/devicehandler.cpp +++ b/examples/bluetooth/heartrate-game/devicehandler.cpp @@ -202,10 +202,10 @@ void DeviceHandler::serviceScanDone() void DeviceHandler::serviceStateChanged(QLowEnergyService::ServiceState s) { switch (s) { - case QLowEnergyService::DiscoveringService: + case QLowEnergyService::RemoteServiceDiscovering: setInfo(tr("Discovering services...")); break; - case QLowEnergyService::ServiceDiscovered: + case QLowEnergyService::RemoteServiceDiscovered: { setInfo(tr("Service discovered.")); @@ -306,7 +306,7 @@ bool DeviceHandler::alive() const #endif if (m_service) - return m_service->state() == QLowEnergyService::ServiceDiscovered; + return m_service->state() == QLowEnergyService::RemoteServiceDiscovered; return false; } |