diff options
5 files changed, 15 insertions, 10 deletions
diff --git a/src/bluetooth/qbluetoothserver_osx.mm b/src/bluetooth/qbluetoothserver_osx.mm index a6768432..eefaf4da 100644 --- a/src/bluetooth/qbluetoothserver_osx.mm +++ b/src/bluetooth/qbluetoothserver_osx.mm @@ -377,8 +377,9 @@ QBluetoothServiceInfo QBluetoothServer::listen(const QBluetoothUuid &uuid, const QBluetoothServiceInfo serviceInfo; serviceInfo.setAttribute(QSInfo::ServiceName, serviceName); - serviceInfo.setAttribute(QSInfo::BrowseGroupList, - QBluetoothUuid(QBluetoothUuid::PublicBrowseGroup)); + QBluetoothServiceInfo::Sequence publicBrowse; + publicBrowse << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::PublicBrowseGroup)); + serviceInfo.setAttribute(QSInfo::BrowseGroupList, publicBrowse); QSInfo::Sequence profileSequence; QSInfo::Sequence classId; diff --git a/src/bluetooth/qbluetoothservicediscoveryagent_android.cpp b/src/bluetooth/qbluetoothservicediscoveryagent_android.cpp index f8201c86..7ab1f50c 100644 --- a/src/bluetooth/qbluetoothservicediscoveryagent_android.cpp +++ b/src/bluetooth/qbluetoothservicediscoveryagent_android.cpp @@ -410,8 +410,9 @@ void QBluetoothServiceDiscoveryAgentPrivate::populateDiscoveredServices(const QB } serviceInfo.setAttribute(QBluetoothServiceInfo::ProtocolDescriptorList, protocolDescriptorList); - serviceInfo.setAttribute(QBluetoothServiceInfo::BrowseGroupList, - QBluetoothUuid(QBluetoothUuid::PublicBrowseGroup)); + QBluetoothServiceInfo::Sequence publicBrowse; + publicBrowse << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::PublicBrowseGroup)); + serviceInfo.setAttribute(QBluetoothServiceInfo::BrowseGroupList, publicBrowse); if (!customUuids.contains(i)) { //if we don't have custom uuid use it as class id as well diff --git a/src/imports/bluetooth/qdeclarativebluetoothservice.cpp b/src/imports/bluetooth/qdeclarativebluetoothservice.cpp index 3c176752..b0d0db60 100644 --- a/src/imports/bluetooth/qdeclarativebluetoothservice.cpp +++ b/src/imports/bluetooth/qdeclarativebluetoothservice.cpp @@ -306,8 +306,9 @@ void QDeclarativeBluetoothService::setRegistered(bool registered) //qDebug() << "name/uuid" << d->m_name << d->m_uuid << d->m_port; - d->m_service->setAttribute(QBluetoothServiceInfo::BrowseGroupList, - QBluetoothUuid(QBluetoothUuid::PublicBrowseGroup)); + QBluetoothServiceInfo::Sequence publicBrowse; + publicBrowse << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::PublicBrowseGroup)); + d->m_service->setAttribute(QBluetoothServiceInfo::BrowseGroupList, publicBrowse); QBluetoothServiceInfo::Sequence protocolDescriptorList; QBluetoothServiceInfo::Sequence protocol; 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; |