summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndré Klitzing <aklitzing@gmail.com>2017-10-06 13:19:53 +0200
committerAndré Klitzing <aklitzing@gmail.com>2017-10-09 13:13:01 +0000
commitcbf95d0ee78ad83cd26887670824e62678e4673e (patch)
tree49ddc33fe549d1bf58bdb41fab17f3bc89bbb873
parent77386257b27dc25caa276b3c05c7b979d513d491 (diff)
Replace mixing of const_iterator by for-each
Change-Id: If828dce2dcd71f36c51216c2db4437683bc2a358 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r--src/nfc/qndefnfcsmartposterrecord.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nfc/qndefnfcsmartposterrecord.cpp b/src/nfc/qndefnfcsmartposterrecord.cpp
index 5f2de2cc..73f2cd21 100644
--- a/src/nfc/qndefnfcsmartposterrecord.cpp
+++ b/src/nfc/qndefnfcsmartposterrecord.cpp
@@ -141,12 +141,10 @@ void QNdefNfcSmartPosterRecord::setPayload(const QByteArray &payload)
if (!payload.isEmpty()) {
// Create new structure
- QNdefMessage message = QNdefMessage::fromByteArray(payload);
+ const QNdefMessage message = QNdefMessage::fromByteArray(payload);
// Iterate through all the records contained in the payload's message.
- for (QList<QNdefRecord>::const_iterator iter = message.begin(); iter != message.end(); iter++) {
- QNdefRecord record = *iter;
-
+ for (const QNdefRecord& record : message) {
// Title
if (record.isRecordType<QNdefNfcTextRecord>()) {
addTitleInternal(record);