summaryrefslogtreecommitdiffstats
path: root/examples/bluetooth/btchat/chatserver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/bluetooth/btchat/chatserver.cpp')
-rw-r--r--examples/bluetooth/btchat/chatserver.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/examples/bluetooth/btchat/chatserver.cpp b/examples/bluetooth/btchat/chatserver.cpp
index 683dfb94..d078a32c 100644
--- a/examples/bluetooth/btchat/chatserver.cpp
+++ b/examples/bluetooth/btchat/chatserver.cpp
@@ -85,13 +85,17 @@ void ChatServer::startServer(const QBluetoothAddress& localAdapter)
//serviceInfo.setAttribute(QBluetoothServiceInfo::ServiceRecordHandle, (uint)0x00010010);
+ QBluetoothServiceInfo::Sequence profileSequence;
QBluetoothServiceInfo::Sequence classId;
-
classId << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::SerialPort));
+ classId << QVariant::fromValue(quint16(0x100));
+ profileSequence.append(QVariant::fromValue(classId));
serviceInfo.setAttribute(QBluetoothServiceInfo::BluetoothProfileDescriptorList,
- classId);
+ profileSequence);
- classId.prepend(QVariant::fromValue(QBluetoothUuid(serviceUuid)));
+ classId.clear();
+ classId << QVariant::fromValue(QBluetoothUuid(serviceUuid));
+ classId << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::SerialPort));
serviceInfo.setAttribute(QBluetoothServiceInfo::ServiceClassIds, classId);