From cbf95d0ee78ad83cd26887670824e62678e4673e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Klitzing?= Date: Fri, 6 Oct 2017 13:19:53 +0200 Subject: Replace mixing of const_iterator by for-each Change-Id: If828dce2dcd71f36c51216c2db4437683bc2a358 Reviewed-by: Alex Blasche --- src/nfc/qndefnfcsmartposterrecord.cpp | 6 ++---- 1 file 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::const_iterator iter = message.begin(); iter != message.end(); iter++) { - QNdefRecord record = *iter; - + for (const QNdefRecord& record : message) { // Title if (record.isRecordType()) { addTitleInternal(record); -- cgit v1.2.3