summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothserver_osx.mm
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@qt.io>2018-10-11 17:31:54 +0200
committerAlex Blasche <alexander.blasche@qt.io>2018-10-15 12:48:51 +0000
commitdfee9aa22f2dbaae3476770d0ab65f26494fe451 (patch)
treeee230824696665fa2d7057c20eaa31cdcf8e0213 /src/bluetooth/qbluetoothserver_osx.mm
parentb09f5e493d13276f74e52367cfe7db46cd581c63 (diff)
Fix the BluetoothProfileDescriptorStructure
As per spec this is meant to be a list/sequence within a sequence and the version was missing too. For simplicity version 1.0 is used. Fixes: QTBUG-58529 Change-Id: I57090148aadf60ea1fbbb207ff0a4ae61e06caf2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/bluetooth/qbluetoothserver_osx.mm')
-rw-r--r--src/bluetooth/qbluetoothserver_osx.mm9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/bluetooth/qbluetoothserver_osx.mm b/src/bluetooth/qbluetoothserver_osx.mm
index d7f29ed3..a6768432 100644
--- a/src/bluetooth/qbluetoothserver_osx.mm
+++ b/src/bluetooth/qbluetoothserver_osx.mm
@@ -380,11 +380,16 @@ QBluetoothServiceInfo QBluetoothServer::listen(const QBluetoothUuid &uuid, const
serviceInfo.setAttribute(QSInfo::BrowseGroupList,
QBluetoothUuid(QBluetoothUuid::PublicBrowseGroup));
+ QSInfo::Sequence profileSequence;
QSInfo::Sequence classId;
classId << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::SerialPort));
- serviceInfo.setAttribute(QSInfo::BluetoothProfileDescriptorList, classId);
+ classId << QVariant::fromValue(quint16(0x100));
+ profileSequence.append(QVariant::fromValue(classId));
+ serviceInfo.setAttribute(QSInfo::BluetoothProfileDescriptorList, profileSequence);
- classId.prepend(QVariant::fromValue(uuid));
+ classId.clear();
+ classId << QVariant::fromValue(uuid);
+ classId << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::SerialPort));
serviceInfo.setAttribute(QSInfo::ServiceClassIds, classId);
serviceInfo.setServiceUuid(uuid);