Commit Graph

16 Commits

Author SHA1 Message Date
Lucie Gérard 664d2a1cf0 Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
License files are organized under LICENSES directory.

Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: Ifc22d8ae24532e9a1093ca613ed6590a1992bc39
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-06-10 15:13:12 +02:00
Andreas Buhr 62cc018b3c 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>
2021-04-08 16:57:19 +02:00
Andreas Buhr 75c3a3ee9f rename error signals to errorOccurred
Currently, there is a name clash between the error getter and
the error signal. This leads to extensive use of qOverload or
similar. This patch renames all error signals to errorOccurred
to resolve this.

Task-number: QTBUG-62877
Change-Id: I615e2405f855433b6e142d820072c4d3f35ae28f
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2021-03-22 13:51:28 +01:00
Andreas Buhr 66bb9839db Use scoped enum for constants in QBluetoothUuid
QBluetoothUuid contains enums for ProtocolUuid, ServiceClassUuid,
CharacteristicType and DescriptorType. So far, they all
put their constants directly into the QBluetoothUuid
namespace, making it easy to mix them up. This patch changes
those to scoped enums. That way, each enum has its items in
its own namespace.

Change-Id: I86ea08ff31009dc8073d84cfe678e27920d693f7
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2021-03-11 13:01:51 +01:00
Alex Blasche c580f1fcad Rename QLEService::DiscoveringServices to DiscoveringService
Singular is a better fit to avoid the notion of several services
being discovered at a given time.

[ChangeLog][QtBluetooth][QLowEnergyService] Renamed DiscoveringServices enum
value to DiscoveringService.

Task-number: QTBUG-75344
Change-Id: I9ebe8a8ccba8bb49c55772ae81338f376826ee64
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-05-14 12:53:25 +00:00
Alex Blasche a1e00ab195 Fix a few clazy/clang warnings in HeartRate Game example
Change-Id: I2a7b8c403ca466998ddcbd8496c31feb9856f0ad
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-09-05 06:53:19 +00:00
Alex Blasche 175dca8f8b Remove direct usage of QLowEnergyController::ctor
QLowEnergyController::createCentral() is the official API to do the same.

Change-Id: Idbd26d201b24add6697f6f9cdf1194511c160273
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-08-21 06:55:28 +00:00
Thiago Macieira 6efa28f0c1 Update to new QRandomGenerator API
Change-Id: I69f37f9304f24709a823fffd14e676c097712329
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2017-11-03 10:30:43 +00:00
Liang Qi 3c29e286c7 Merge remote-tracking branch 'origin/5.9' into 5.10
Change-Id: Iaa053dcb125490ee1e83d7e27cb75d4171297b9f
2017-10-30 08:43:34 +01:00
Kai Koehne b171cddac0 Fix outdated BSD license header
Change-Id: I28f5936913a6127806325df34af4bf71a142e72e
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2017-10-17 11:17:54 +00:00
Thiago Macieira 7761bb8800 Use QRandomGenerator instead of q?rand
Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-06-30 05:59:42 +00:00
Alex Blasche e83df9ffb9 Use heartrate-game example for snippets in BTLE overview
heartlistener example will be removed.

Change-Id: Iaa5c5f629cf351b97c18f61b4fab2cbbd8d0744c
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2017-04-07 06:58:49 +00:00
Alex Blasche 26293d827f Update heartrate-game against latest heartlistener example
This patch incorporates the following two heartlistener patch:

1750983d3f
b01389be13

The above two patches were applied to the heartlistener example after
the fork for the new heartrate-game example was done. This patch applies
the missing two patches.

The first patch restricts the communication to Low Energy devices
The second patch ensures that the device properly disables the
heartrate notifications on disconnect events.

Change-Id: Ia2904f2ae3d5cef22abcc9815c5e0c342370e83c
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-04-06 08:27:29 +00:00
Alex Blasche 6520f8af71 Permit BlueZ platforms to set the address type in heartrate-game
BlueZ is the only platform that requires to set the BTLE address type.
The patch introduces a new UI button which allows the user to toggle
the address type.

The UI element is disabled on all platforms but Linux/BlueZ systems.

The number of devices returned in simulator mode is reduced to
four devices. This was done purely for esthetical reasons as the
additional address type button takes screen real estate away and
five simulator devices require more screen real estate than the
remaining space for device list. This avoid the need for scrolling.

Change-Id: I14cf26b3c821db7768b9d018c2d09441cd97679a
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-05 08:41:58 +00:00
Alex Blasche 462954b302 Add means to enable simulator build with one easy define
Otherwise it is only enabled on Win32 builds

Change-Id: I23ce25411294ebe2dae2272c16789da897b43e82
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-04-04 09:02:31 +00:00
Alex Blasche 283870e39b Add new heartrate example
The example is a redesign by Lasse Räihä based in the
heartrate-listener example.

Change-Id: Iec0f48603408b37c7054839d520368eb1e436895
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-04-03 06:26:30 +00:00