diff options
author | Alex Blasche <alexander.blasche@qt.io> | 2017-10-17 09:42:01 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@qt.io> | 2017-10-17 09:42:13 +0200 |
commit | fc2a206322f6190226ebc1f04062f2c9170f0bac (patch) | |
tree | 7df8ca41816c24ccfa6e0c6add4612689a933bdd /src/nfc/qndefnfcsmartposterrecord.cpp | |
parent | ca5490859338f28e30104668a353275d23df1ec6 (diff) | |
parent | 125cdccc346903d6e70ed26289cdaed85e26ec3f (diff) |
Merge remote-tracking branch 'gerrit/dev' into btle
Change-Id: Ia1cbaac9774ce2bc1b6972c02bad34fa593d40ff
Diffstat (limited to 'src/nfc/qndefnfcsmartposterrecord.cpp')
-rw-r--r-- | src/nfc/qndefnfcsmartposterrecord.cpp | 8 |
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; } |