diff options
Diffstat (limited to 'examples/bluetooth/lowenergyscanner/characteristicinfo.cpp')
-rw-r--r-- | examples/bluetooth/lowenergyscanner/characteristicinfo.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/bluetooth/lowenergyscanner/characteristicinfo.cpp b/examples/bluetooth/lowenergyscanner/characteristicinfo.cpp index 58f91f5d..f64ddf79 100644 --- a/examples/bluetooth/lowenergyscanner/characteristicinfo.cpp +++ b/examples/bluetooth/lowenergyscanner/characteristicinfo.cpp @@ -76,7 +76,8 @@ QString CharacteristicInfo::getName() const return name; // find descriptor with CharacteristicUserDescription - foreach (const QLowEnergyDescriptor &descriptor, m_characteristic.descriptors()) { + const QList<QLowEnergyDescriptor> descriptors = m_characteristic.descriptors(); + for (const QLowEnergyDescriptor &descriptor : descriptors) { if (descriptor.type() == QBluetoothUuid::CharacteristicUserDescription) { name = descriptor.value(); break; |