diff options
author | Fabian Bumberger <fbumberger@rim.com> | 2013-10-01 14:20:26 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-01 15:53:59 +0200 |
commit | eefe516bd08771d037afafc833764ebaa6ff213e (patch) | |
tree | a7de9029265fdebc4036e87188d50c945ab38086 /examples/bluetooth | |
parent | 80884c9842899094574635e872fc717aaaa8814c (diff) |
Change the service properties in btchat example
And adding some links to the documentation.
Change-Id: I7f9baf6a648547ef028f9521b0d88b88267fa301
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'examples/bluetooth')
-rw-r--r-- | examples/bluetooth/btchat/chatserver.cpp | 9 |
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] |