summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@qt.io>2018-10-12 13:30:48 +0200
committerAlex Blasche <alexander.blasche@qt.io>2018-10-16 07:47:34 +0000
commit97dc04e0d74687b4cafab3676d3582f758a0a4cc (patch)
tree6f0ff85e522d8329f8b9c4832b3a2b43961f5a4b /tests
parentdfee9aa22f2dbaae3476770d0ab65f26494fe451 (diff)
Fix SDP BrowseGroupList entry
A BrowseGroupList is defined as sequence in which each element is a UUID that represents a browse group to which the service record belongs. Except for the QBluetoothServer::listen() implementation every other implementation did not use the sequence pattern. This patch unifies all BrowseGroupList entries through QtBluetooth and its examples/tests. Change-Id: I37640ae0500c557d79350359883abc6a66a46346 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp5
-rw-r--r--tests/bttestui/btlocaldevice.cpp5
2 files changed, 6 insertions, 4 deletions
diff --git a/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp b/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp
index 9bac6791..94a065bc 100644
--- a/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp
+++ b/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp
@@ -286,8 +286,9 @@ void tst_QBluetoothServiceDiscoveryAgent::tst_serviceDiscoveryAdapters()
server.listen(addresses[0]);
QBluetoothServiceInfo serviceInfo;
serviceInfo.setAttribute(QBluetoothServiceInfo::ServiceName, "serviceName");
- serviceInfo.setAttribute(QBluetoothServiceInfo::BrowseGroupList,
- QBluetoothUuid(QBluetoothUuid::PublicBrowseGroup));
+ QBluetoothServiceInfo::Sequence publicBrowse;
+ publicBrowse << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::PublicBrowseGroup));
+ serviceInfo.setAttribute(QBluetoothServiceInfo::BrowseGroupList, publicBrowse);
QBluetoothServiceInfo::Sequence profileSequence;
QBluetoothServiceInfo::Sequence classId;
diff --git a/tests/bttestui/btlocaldevice.cpp b/tests/bttestui/btlocaldevice.cpp
index d7590b70..07edbe0c 100644
--- a/tests/bttestui/btlocaldevice.cpp
+++ b/tests/bttestui/btlocaldevice.cpp
@@ -600,8 +600,9 @@ void BtLocalDevice::serverListenPort()
// Service Discoverability
- serviceInfo.setAttribute(QBluetoothServiceInfo::BrowseGroupList,
- QBluetoothUuid(QBluetoothUuid::PublicBrowseGroup));
+ QBluetoothServiceInfo::Sequence browseSequence;
+ browseSequence << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::PublicBrowseGroup));
+ serviceInfo.setAttribute(QBluetoothServiceInfo::BrowseGroupList, browseSequence);
// Protocol descriptor list
QBluetoothServiceInfo::Sequence protocolDescriptorList;