summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothserviceinfo_qnx.cpp
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2013-09-23 13:52:35 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-25 10:37:27 +0200
commit85de7d64e85aa058f1777bc9d1a778790b1d50a6 (patch)
treea498afb7454905736cf589d3624ab68542ae04d8 /src/bluetooth/qbluetoothserviceinfo_qnx.cpp
parent85eac47703aa40df76e5102eb04291d8f029bfa3 (diff)
Fix peer to peer communication using two local adapters.
The code assumed to use the default adapter in a variety of places which caused wrong SDP registrations, device searches and peer names. The btchat examples was extended to cope with two local adapters. If there are more than two local adapters they will be ignored. Change-Id: I27d8bce65d943773e4e6cbd86982446fa79664a4 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/bluetooth/qbluetoothserviceinfo_qnx.cpp')
-rw-r--r--src/bluetooth/qbluetoothserviceinfo_qnx.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/bluetooth/qbluetoothserviceinfo_qnx.cpp b/src/bluetooth/qbluetoothserviceinfo_qnx.cpp
index cb82851c..cd1ecfef 100644
--- a/src/bluetooth/qbluetoothserviceinfo_qnx.cpp
+++ b/src/bluetooth/qbluetoothserviceinfo_qnx.cpp
@@ -61,7 +61,7 @@ bool QBluetoothServiceInfoPrivate::isRegistered() const
return registered;
}
-bool QBluetoothServiceInfoPrivate::unregisterService() const
+bool QBluetoothServiceInfoPrivate::unregisterService()
{
if (!registered)
return false;
@@ -70,7 +70,7 @@ bool QBluetoothServiceInfoPrivate::unregisterService() const
}
-void QBluetoothServiceInfoPrivate::setRegisteredAttribute(quint16 attributeId, const QVariant &value) const
+void QBluetoothServiceInfoPrivate::setRegisteredAttribute(quint16 attributeId, const QVariant &value)
{
Q_UNUSED(attributeId);
Q_UNUSED(value);
@@ -78,7 +78,7 @@ void QBluetoothServiceInfoPrivate::setRegisteredAttribute(quint16 attributeId, c
registerService();
}
-void QBluetoothServiceInfoPrivate::removeRegisteredAttribute(quint16 attributeId) const
+void QBluetoothServiceInfoPrivate::removeRegisteredAttribute(quint16 attributeId)
{
Q_UNUSED(attributeId);
registered = false;
@@ -86,8 +86,9 @@ void QBluetoothServiceInfoPrivate::removeRegisteredAttribute(quint16 attributeId
extern QHash<QBluetoothServerPrivate*, int> __fakeServerPorts;
-bool QBluetoothServiceInfoPrivate::registerService() const
+bool QBluetoothServiceInfoPrivate::registerService(const QBluetoothAddress& localAdapter)
{
+ Q_UNUSED(localAdapter); //QNX always uses default local adapter
if (protocolDescriptor(QBluetoothUuid::Rfcomm).isEmpty()) {
qWarning() << Q_FUNC_INFO << "Only SPP services can be registered on QNX";
return false;