summaryrefslogtreecommitdiffstats
path: root/src/nfc/qndefnfcsmartposterrecord.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/nfc/qndefnfcsmartposterrecord.cpp')
-rw-r--r--src/nfc/qndefnfcsmartposterrecord.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/nfc/qndefnfcsmartposterrecord.cpp b/src/nfc/qndefnfcsmartposterrecord.cpp
index bc369980..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);
@@ -720,7 +718,7 @@ QNdefNfcSmartPosterRecord::Action QNdefNfcActRecord::action() const
QNdefNfcSmartPosterRecord::UnspecifiedAction;
if (!p.isEmpty())
- value = QNdefNfcSmartPosterRecord::Action(p[0]);
+ value = QNdefNfcSmartPosterRecord::Action(static_cast<signed char>(p[0]));
return value;
}