diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2014-05-26 14:56:49 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@digia.com> | 2014-05-26 14:56:49 +0200 |
commit | f334ea4b196950c4074e7513626aabeef3d99d7f (patch) | |
tree | ccb07d59afbb60a92b80a061645c8013aab9b96c /src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp | |
parent | 3910d9ffcc11db7b3beb7f2b6f0c1754103cfacb (diff) | |
parent | 552f1a164d627720942414915fb56ae7d3b7ef22 (diff) |
Merge branch 'dev' into btle
Conflicts:
examples/bluetooth/bluetooth.pro
src/bluetooth/bluez/bluez.pri
src/bluetooth/doc/src/bluetooth-index.qdoc
src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp
src/bluetooth/qbluetoothdeviceinfo.cpp
src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp
src/bluetooth/qbluetoothservicediscoveryagent_p.h
src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp
Change-Id: I88b22c51a4ee95b067ef8d2b2fddb5cbff4566f8
Diffstat (limited to 'src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp')
-rw-r--r-- | src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp b/src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp index 37fabfab..81d2c623 100644 --- a/src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp +++ b/src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp @@ -204,10 +204,10 @@ void QBluetoothServiceDiscoveryAgentPrivate::start(const QBluetoothAddress &addr const QString filePath = QStringLiteral("/pps/services/bluetooth/remote_devices/").append(address.toString()); bool hasError = false; if ((m_rdfd = qt_safe_open(filePath.toLocal8Bit().constData(), O_RDONLY)) == -1) { - if (QFile::exists(filePath + QLatin1String("-00")) || - QFile::exists(filePath + QLatin1String("-01"))) + if (QFile::exists(filePath + QStringLiteral("-00")) || + QFile::exists(filePath + QStringLiteral("-01"))) { - qCDebug(QT_BT_QNX) << "LE device discovered..."; + qCDebug(QT_BT_QNX) << "LE device discovered...skipping"; QString lePath = filePath + QStringLiteral("-00"); if ((m_rdfd = qt_safe_open(lePath.toLocal8Bit().constData(), O_RDONLY)) == -1) { lePath = filePath + QStringLiteral("-01"); @@ -324,19 +324,8 @@ void QBluetoothServiceDiscoveryAgentPrivate::remoteDevicesChanged(int fd) serviceInfo.setAttribute(QBluetoothServiceInfo::BrowseGroupList, QBluetoothUuid(QBluetoothUuid::PublicBrowseGroup)); - bool entryExists = false; //Did we already discover this service? - foreach (QBluetoothServiceInfo sInfo, q_ptr->discoveredServices()) { - if (sInfo.device() == serviceInfo.device() - && sInfo.serviceUuid() == serviceInfo.serviceUuid() - && sInfo.serviceClassUuids() == serviceInfo.serviceClassUuids()) { - entryExists = true; - //qCDebug(QT_BT_QNX) << "Entry exists" << serviceInfo.serviceClassUuids().first() << sInfo.serviceClassUuids().first(); - break; - } - } - - if (!entryExists) { + if (!isDuplicatedService(serviceInfo)) { qCDebug(QT_BT_QNX) << "Adding service" << next_service << " " << serviceInfo.socketProtocol(); discoveredServices << serviceInfo; q_ptr->serviceDiscovered(serviceInfo); |