summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qlowenergyservicedata.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@theqtcompany.com>2016-02-04 16:07:43 +0100
committerChristian Kandeler <christian.kandeler@theqtcompany.com>2016-02-09 16:25:40 +0000
commit547c931904e5251fe79413ba933506a88df0fbbb (patch)
tree896896dc03feb6ede09ce7ea3eab5fdfe0fae209 /src/bluetooth/qlowenergyservicedata.cpp
parenta56a776d4199568657f10248d387c87e40c508fc (diff)
Bluetooth LE: Fix two list setter functions.
Adding the new list elements is all well and nice, but we have to clear the existing ones first. Change-Id: I1b044f2ea86a4a300bde93535a944c18328aa805 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/bluetooth/qlowenergyservicedata.cpp')
-rw-r--r--src/bluetooth/qlowenergyservicedata.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bluetooth/qlowenergyservicedata.cpp b/src/bluetooth/qlowenergyservicedata.cpp
index 94be1237..17f984a6 100644
--- a/src/bluetooth/qlowenergyservicedata.cpp
+++ b/src/bluetooth/qlowenergyservicedata.cpp
@@ -167,6 +167,7 @@ QList<QLowEnergyCharacteristicData> QLowEnergyServiceData::characteristics() con
*/
void QLowEnergyServiceData::setCharacteristics(const QList<QLowEnergyCharacteristicData> &characteristics)
{
+ d->characteristics.clear();
foreach (const QLowEnergyCharacteristicData &cd, characteristics)
addCharacteristic(cd);
}