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.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/examples/bluetooth/btchat/chatserver.cpp b/examples/bluetooth/btchat/chatserver.cpp
index 8b1bf6f0..0b29b87b 100644
--- a/examples/bluetooth/btchat/chatserver.cpp
+++ b/examples/bluetooth/btchat/chatserver.cpp
@@ -73,11 +73,16 @@ void ChatServer::startServer(const QBluetoothAddress& localAdapter)
}
//! [Create the server]
- serviceInfo.setAttribute(QBluetoothServiceInfo::ServiceRecordHandle, (uint)0x00010010);
+ //serviceInfo.setAttribute(QBluetoothServiceInfo::ServiceRecordHandle, (uint)0x00010010);
//! [Class Uuuid must contain at least 1 entry]
QBluetoothServiceInfo::Sequence classId;
- classId << QVariant::fromValue(QBluetoothUuid(serviceUuid));
+
+ classId << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::SerialPort));
+ serviceInfo.setAttribute(QBluetoothServiceInfo::BluetoothProfileDescriptorList,
+ classId);
+
+ classId.prepend(QVariant::fromValue(QBluetoothUuid(serviceUuid)));
serviceInfo.setAttribute(QBluetoothServiceInfo::ServiceClassIds, classId);
//! [Class Uuuid must contain at least 1 entry]