summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2011-03-24 12:43:53 +1000
committerAaron McCarthy <aaron.mccarthy@nokia.com>2011-03-24 15:57:46 +1000
commita06949e66d543b225d239560c428cb851002eddc (patch)
tree90f52142e5991c178d6116c8a749dd7e269428e7 /doc/src/snippets
parent2c8163a8582ee1654246e3109b68f1c72cd90732 (diff)
Initialise specialised NDEF record types.
Depending on the record type specifications a record with an empty payload might not be a valid record. For example the Text record has a minium size of 1 byte (the status byte), the locale and text may be of zero size as specified by the status byte and the payload length. Uri records also have a 1 byte minium size (the uri prefix).
Diffstat (limited to 'doc/src/snippets')
-rw-r--r--doc/src/snippets/connectivity/nfc.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/src/snippets/connectivity/nfc.cpp b/doc/src/snippets/connectivity/nfc.cpp
index 1116a28f4f..f92fc4e48f 100644
--- a/doc/src/snippets/connectivity/nfc.cpp
+++ b/doc/src/snippets/connectivity/nfc.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -63,7 +63,8 @@ void snippet_recordConversion()
class ExampleComF : public QNdefRecord
{
public:
- Q_DECLARE_NDEF_RECORD(ExampleComF, QNdefRecord::ExternalRtd, "example.com:f")
+ Q_DECLARE_NDEF_RECORD(ExampleComF, QNdefRecord::ExternalRtd, "example.com:f",
+ QByteArray(sizeof(int), char(0)))
int foo() const;
void setFoo(int v);