diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-04-21 16:32:39 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-04-21 17:54:25 +0000 |
commit | 2d73a4dce69dcbd8f18c65ebc335851f092fb214 (patch) | |
tree | f7c93c0ce7df12710dac4ef3f10b3709d5db0ebe | |
parent | b08fc0c605aa4e2f77d716f2e039af29dde9e243 (diff) |
Add assignment operator to QNdefNfcSmartPosterRecord.
Required to pass the headersclean test.
Change-Id: I0b274ee90c4172dde99dc2f8f60525466fb8d35f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | src/nfc/qndefnfcsmartposterrecord.cpp | 12 | ||||
-rw-r--r-- | src/nfc/qndefnfcsmartposterrecord.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/nfc/qndefnfcsmartposterrecord.cpp b/src/nfc/qndefnfcsmartposterrecord.cpp index 9bec5b7a..b71b8ac2 100644 --- a/src/nfc/qndefnfcsmartposterrecord.cpp +++ b/src/nfc/qndefnfcsmartposterrecord.cpp @@ -92,6 +92,18 @@ QNdefNfcSmartPosterRecord::QNdefNfcSmartPosterRecord(const QNdefNfcSmartPosterRe } /*! + Assigns the \a other smart poster record to this record and returns a reference to + this record. +*/ +QNdefNfcSmartPosterRecord &QNdefNfcSmartPosterRecord::operator=(const QNdefNfcSmartPosterRecord &other) +{ + if (this != &other) + d = other.d; + + return *this; +} + +/*! Destroys the smart poster. */ QNdefNfcSmartPosterRecord::~QNdefNfcSmartPosterRecord() diff --git a/src/nfc/qndefnfcsmartposterrecord.h b/src/nfc/qndefnfcsmartposterrecord.h index f390f730..08c5aaaf 100644 --- a/src/nfc/qndefnfcsmartposterrecord.h +++ b/src/nfc/qndefnfcsmartposterrecord.h @@ -84,6 +84,7 @@ public: QNdefNfcSmartPosterRecord(); QNdefNfcSmartPosterRecord(const QNdefRecord &other); QNdefNfcSmartPosterRecord(const QNdefNfcSmartPosterRecord &other); + QNdefNfcSmartPosterRecord &operator=(const QNdefNfcSmartPosterRecord &other); ~QNdefNfcSmartPosterRecord(); void setPayload(const QByteArray &payload); |