diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2014-04-11 14:58:52 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-14 12:30:47 +0200 |
commit | 5c2f4d3472630be3a7b35c136434df5e8b50928f (patch) | |
tree | f66619b62adb44cefa5186399b6e957de76527c7 /src/imports | |
parent | 9615e7fbf439d0b2b9476ea7cb15ad145e675583 (diff) |
Fix inconsistent behavior between BtDiscoveryModel & BtServiceDiscoveryAgent
The model always resets the model content when starting a new service
discovery. However QBluetoothServiceDiscovery doesn't do that. It adds
newly discovered services and maintains the existing services. Since
the model updates its content based on the serviceDiscovered signal,
every second run created an empty list or only ever added services.
Change-Id: I9c1d29562b9178678ab42bee98d5d1e3d0c4367f
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Diffstat (limited to 'src/imports')
-rw-r--r-- | src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp b/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp index 842d042d..d042bdfe 100644 --- a/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp +++ b/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp @@ -403,6 +403,7 @@ void QDeclarativeBluetoothDiscoveryModel::setRunning(bool running) } d->m_serviceAgent->setRemoteAddress(QBluetoothAddress(d->m_remoteAddress)); + d->m_serviceAgent->clear(); if (!d->m_uuid.isEmpty()) d->m_serviceAgent->setUuidFilter(QBluetoothUuid(d->m_uuid)); |