summaryrefslogtreecommitdiffstats
path: root/src/nfc/qndefnfctextrecord.cpp
diff options
context:
space:
mode:
authorStuart Burge <sburge@blackberry.com>2013-06-19 11:03:25 -0400
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-07-02 08:59:42 +0200
commitdb2fc63155e8c821f5c6c751a33974cab9cb4ed3 (patch)
tree2b4265f74d2c285c21c46dc2c3d9418584bec986 /src/nfc/qndefnfctextrecord.cpp
parent1dce1dd4dda63d7b309710114f5d1eea69a52449 (diff)
Add support for NFC smart poster
Provide ability to construct a smart poster record from an NDEF record and get/set smart poster specific values. The record can be used as part of an NDEF message for transmission via NFC or writing to a tag Task-number: QTBUG-31738 Change-Id: I2f7ff287d7c732a3fb3ec7c5c6a7b8f50f13ab1d Reviewed-by: Alex <alexander.blasche@digia.com>
Diffstat (limited to 'src/nfc/qndefnfctextrecord.cpp')
-rw-r--r--src/nfc/qndefnfctextrecord.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nfc/qndefnfctextrecord.cpp b/src/nfc/qndefnfctextrecord.cpp
index 2271e80e..212f804f 100644
--- a/src/nfc/qndefnfctextrecord.cpp
+++ b/src/nfc/qndefnfctextrecord.cpp
@@ -130,7 +130,7 @@ QString QNdefNfcTextRecord::text() const
QTextCodec *codec = QTextCodec::codecForName(utf16 ? "UTF-16BE" : "UTF-8");
- return codec->toUnicode(p.constData() + 1 + codeLength, p.length() - 1 - codeLength);
+ return codec ? codec->toUnicode(p.constData() + 1 + codeLength, p.length() - 1 - codeLength) : QString();
}
/*!