diff options
author | Alex Blasche <alexander.blasche@qt.io> | 2019-01-07 14:55:21 +0100 |
---|---|---|
committer | Alex Blasche <alexander.blasche@qt.io> | 2019-01-09 08:12:29 +0000 |
commit | e957470ae0e61eea1afa96d76468dbdc87168421 (patch) | |
tree | e93eb251a0f03546a9dc49cc59363bd364a98547 /tests | |
parent | 45608abda7b9470ec0b3ea26e849ec71b637288d (diff) |
Ensure custom uuids are returned by QBluetoothServiceInfo::serviceUuid()
QBluetoothServiceDiscoveryAgent::start(FullDiscovery) uses an external
tool called sdpscanner to perform the SDP inquiry. The tool uses Bluez's
own API to perform the task and is GPL.
In case a remote device offers a custom service the service uuid is returned
as serviceClassUuid. QBluetoothServiceInfo::serviceUuid() remains empty
although it should be populated as per API contract. This patch ensures
that the first custom uuid is shifted from the serviceClassUuid list to
serviceUuid(). The fix is limited because it picks the first custom uuid
and does not consider a secondary custom uuid. Such a case is extremely
unlikely though and I have not come across it.
Fixes: QTBUG-72800
Change-Id: I7256440bcb1c9b0b2fb75249f977c43fecf1d910
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions