diff options
| author | Linus Jahn <lnj@kaidan.im> | 2022-06-17 18:26:01 +0200 |
|---|---|---|
| committer | Linus Jahn <lnj@kaidan.im> | 2022-06-18 12:45:19 +0200 |
| commit | 31ef165cbbf918ba0ddd00f86c6dee257a0b936b (patch) | |
| tree | e891a37cf70fbc60354d9a9cd69d4e9cb7d34a80 /src/base | |
| parent | 675f57b1d7facab15eff303f022c332a8220777e (diff) | |
Add move constructors and move assignment operators everywhere
This is so std::move() on implicitly-shared types actually moves the
content and doesn't call the copy ctor/assignment operator.
Diffstat (limited to 'src/base')
64 files changed, 318 insertions, 237 deletions
diff --git a/src/base/QXmppBitsOfBinaryContentId.cpp b/src/base/QXmppBitsOfBinaryContentId.cpp index 5a459114..3810b31f 100644 --- a/src/base/QXmppBitsOfBinaryContentId.cpp +++ b/src/base/QXmppBitsOfBinaryContentId.cpp @@ -123,12 +123,14 @@ bool QXmppBitsOfBinaryContentId::operator==(const QXmppBitsOfBinaryContentId &ot /// Default destructor QXmppBitsOfBinaryContentId::~QXmppBitsOfBinaryContentId() = default; - /// Default copy-constructor QXmppBitsOfBinaryContentId::QXmppBitsOfBinaryContentId(const QXmppBitsOfBinaryContentId &cid) = default; - +/// Default move-constructor +QXmppBitsOfBinaryContentId::QXmppBitsOfBinaryContentId(QXmppBitsOfBinaryContentId &&cid) = default; /// Default assignment operator QXmppBitsOfBinaryContentId &QXmppBitsOfBinaryContentId::operator=(const QXmppBitsOfBinaryContentId &other) = default; +/// Default move-assignment operator +QXmppBitsOfBinaryContentId &QXmppBitsOfBinaryContentId::operator=(QXmppBitsOfBinaryContentId &&other) = default; /// /// Returns a \xep{0231, Bits of Binary} content id diff --git a/src/base/QXmppBitsOfBinaryContentId.h b/src/base/QXmppBitsOfBinaryContentId.h index 219b36c8..79e8a625 100644 --- a/src/base/QXmppBitsOfBinaryContentId.h +++ b/src/base/QXmppBitsOfBinaryContentId.h @@ -20,9 +20,11 @@ public: QXmppBitsOfBinaryContentId(); QXmppBitsOfBinaryContentId(const QXmppBitsOfBinaryContentId &cid); + QXmppBitsOfBinaryContentId(QXmppBitsOfBinaryContentId &&); ~QXmppBitsOfBinaryContentId(); QXmppBitsOfBinaryContentId &operator=(const QXmppBitsOfBinaryContentId &other); + QXmppBitsOfBinaryContentId &operator=(QXmppBitsOfBinaryContentId &&); QString toContentId() const; QString toCidUrl() const; diff --git a/src/base/QXmppBitsOfBinaryData.cpp b/src/base/QXmppBitsOfBinaryData.cpp index 3486554d..51f20bc4 100644 --- a/src/base/QXmppBitsOfBinaryData.cpp +++ b/src/base/QXmppBitsOfBinaryData.cpp @@ -50,12 +50,14 @@ QXmppBitsOfBinaryData::QXmppBitsOfBinaryData() /// Default copy-constructor QXmppBitsOfBinaryData::QXmppBitsOfBinaryData(const QXmppBitsOfBinaryData &) = default; - +/// Default move-constructor +QXmppBitsOfBinaryData::QXmppBitsOfBinaryData(QXmppBitsOfBinaryData &&) = default; /// Default destructor QXmppBitsOfBinaryData::~QXmppBitsOfBinaryData() = default; - /// Default assignment operator QXmppBitsOfBinaryData &QXmppBitsOfBinaryData::operator=(const QXmppBitsOfBinaryData &) = default; +/// Default move-assignment operator +QXmppBitsOfBinaryData &QXmppBitsOfBinaryData::operator=(QXmppBitsOfBinaryData &&) = default; /// /// Returns the content id of the data diff --git a/src/base/QXmppBitsOfBinaryData.h b/src/base/QXmppBitsOfBinaryData.h index 4ae6370c..3e5ad20b 100644 --- a/src/base/QXmppBitsOfBinaryData.h +++ b/src/base/QXmppBitsOfBinaryData.h @@ -20,9 +20,11 @@ class QXMPP_EXPORT QXmppBitsOfBinaryData public: QXmppBitsOfBinaryData(); QXmppBitsOfBinaryData(const QXmppBitsOfBinaryData &); + QXmppBitsOfBinaryData(QXmppBitsOfBinaryData &&); ~QXmppBitsOfBinaryData(); QXmppBitsOfBinaryData &operator=(const QXmppBitsOfBinaryData &); + QXmppBitsOfBinaryData &operator=(QXmppBitsOfBinaryData &&); QXmppBitsOfBinaryContentId cid() const; void setCid(const QXmppBitsOfBinaryContentId &cid); diff --git a/src/base/QXmppDataForm.cpp b/src/base/QXmppDataForm.cpp index 2b165aec..9f68046c 100644 --- a/src/base/QXmppDataForm.cpp +++ b/src/base/QXmppDataForm.cpp @@ -130,11 +130,13 @@ QXmppDataForm::MediaSource::MediaSource(const QUrl &uri, const QMimeType &conten /// Default copy-constructor QXmppDataForm::MediaSource::MediaSource(const QXmppDataForm::MediaSource &) = default; - +/// Default move-constructor +QXmppDataForm::MediaSource::MediaSource(QXmppDataForm::MediaSource &&) = default; QXmppDataForm::MediaSource::~MediaSource() = default; - /// Default assignment operator QXmppDataForm::MediaSource &QXmppDataForm::MediaSource::operator=(const QXmppDataForm::MediaSource &) = default; +/// Default move-assignment operator +QXmppDataForm::MediaSource &QXmppDataForm::MediaSource::operator=(QXmppDataForm::MediaSource &&) = default; /// /// Returns the media URI as QUrl. This can be i.e. a \c http:// URL or a @@ -344,12 +346,14 @@ QXmppDataForm::Field::Field(QXmppDataForm::Field::Type type, /// Constructs a copy of \a other. QXmppDataForm::Field::Field(const QXmppDataForm::Field &other) = default; - +/// Default move constructor. +QXmppDataForm::Field::Field(QXmppDataForm::Field &&) = default; /// Destroys the form field. QXmppDataForm::Field::~Field() = default; - /// Assigns \a other to this field. QXmppDataForm::Field &QXmppDataForm::Field::operator=(const QXmppDataForm::Field &other) = default; +/// Default move-assignment operator. +QXmppDataForm::Field &QXmppDataForm::Field::operator=(QXmppDataForm::Field &&) = default; /// /// Returns the field's description. @@ -661,12 +665,14 @@ QXmppDataForm::QXmppDataForm(const QXmppDataFormBase &based) /// Constructs a copy of \a other. QXmppDataForm::QXmppDataForm(const QXmppDataForm &other) = default; - +/// Default move constructor. +QXmppDataForm::QXmppDataForm(QXmppDataForm &&other) = default; /// Destroys the form. QXmppDataForm::~QXmppDataForm() = default; - /// Assigns \a other to this form. QXmppDataForm &QXmppDataForm::operator=(const QXmppDataForm &other) = default; +/// Default move-assignment operator. +QXmppDataForm &QXmppDataForm::operator=(QXmppDataForm &&) = default; /// /// Returns the form's fields. diff --git a/src/base/QXmppDataForm.h b/src/base/QXmppDataForm.h index f0aaf439..c4280b46 100644 --- a/src/base/QXmppDataForm.h +++ b/src/base/QXmppDataForm.h @@ -32,9 +32,11 @@ public: MediaSource(); MediaSource(const QUrl &uri, const QMimeType &contentType); MediaSource(const QXmppDataForm::MediaSource &); + MediaSource(QXmppDataForm::MediaSource &&); ~MediaSource(); MediaSource &operator=(const MediaSource &); + MediaSource &operator=(MediaSource &&); QUrl uri() const; void setUri(const QUrl &uri); @@ -108,9 +110,11 @@ public: const QString &description = {}, const QList<QPair<QString, QString>> &options = {}); Field(const QXmppDataForm::Field &other); + Field(QXmppDataForm::Field &&); ~Field(); QXmppDataForm::Field &operator=(const QXmppDataForm::Field &other); + QXmppDataForm::Field &operator=(QXmppDataForm::Field &&); QString description() const; void setDescription(const QString &description); @@ -175,9 +179,11 @@ public: const QString &instructions = {}); QXmppDataForm(const QXmppDataFormBase &based); QXmppDataForm(const QXmppDataForm &other); + QXmppDataForm(QXmppDataForm &&); ~QXmppDataForm(); QXmppDataForm &operator=(const QXmppDataForm &other); + QXmppDataForm &operator=(QXmppDataForm &&); QString instructions() const; void setInstructions(const QString &instructions); diff --git a/src/base/QXmppDataFormBase.cpp b/src/base/QXmppDataFormBase.cpp index d46ad1db..1dfb0429 100644 --- a/src/base/QXmppDataFormBase.cpp +++ b/src/base/QXmppDataFormBase.cpp @@ -164,8 +164,10 @@ QXmppExtensibleDataFormBase::QXmppExtensibleDataFormBase() /// \cond QXmppExtensibleDataFormBase::QXmppExtensibleDataFormBase(const QXmppExtensibleDataFormBase &) = default; +QXmppExtensibleDataFormBase::QXmppExtensibleDataFormBase(QXmppExtensibleDataFormBase &&) = default; QXmppExtensibleDataFormBase::~QXmppExtensibleDataFormBase() = default; QXmppExtensibleDataFormBase &QXmppExtensibleDataFormBase::operator=(const QXmppExtensibleDataFormBase &) = default; +QXmppExtensibleDataFormBase &QXmppExtensibleDataFormBase::operator=(QXmppExtensibleDataFormBase &&) = default; /// \endcond /// diff --git a/src/base/QXmppDataFormBase.h b/src/base/QXmppDataFormBase.h index b5751f1d..0fe1b6aa 100644 --- a/src/base/QXmppDataFormBase.h +++ b/src/base/QXmppDataFormBase.h @@ -101,9 +101,11 @@ public: QXmppExtensibleDataFormBase(); /// \cond QXmppExtensibleDataFormBase(const QXmppExtensibleDataFormBase &); + QXmppExtensibleDataFormBase(QXmppExtensibleDataFormBase &&); virtual ~QXmppExtensibleDataFormBase(); QXmppExtensibleDataFormBase &operator=(const QXmppExtensibleDataFormBase &); + QXmppExtensibleDataFormBase &operator=(QXmppExtensibleDataFormBase &&); /// \endcond QList<QXmppDataForm::Field> unknownFields() const; diff --git a/src/base/QXmppDiscoveryIq.cpp b/src/base/QXmppDiscoveryIq.cpp index 2e4586a3..93e1c444 100644 --- a/src/base/QXmppDiscoveryIq.cpp +++ b/src/base/QXmppDiscoveryIq.cpp @@ -60,11 +60,13 @@ QXmppDiscoveryIq::Identity::Identity() /// Default copy-constructor QXmppDiscoveryIq::Identity::Identity(const QXmppDiscoveryIq::Identity &other) = default; - +/// Default move-constructor +QXmppDiscoveryIq::Identity::Identity(QXmppDiscoveryIq::Identity &&) = default; QXmppDiscoveryIq::Identity::~Identity() = default; - /// Default assignment operator QXmppDiscoveryIq::Identity &QXmppDiscoveryIq::Identity::operator=(const QXmppDiscoveryIq::Identity &) = default; +/// Default move-assignment operator +QXmppDiscoveryIq::Identity &QXmppDiscoveryIq::Identity::operator=(QXmppDiscoveryIq::Identity &&) = default; /// /// Returns the category (e.g. "account", "client", "conference", etc.) of the @@ -168,11 +170,13 @@ QXmppDiscoveryIq::Item::Item() /// Default copy-constructor QXmppDiscoveryIq::Item::Item(const QXmppDiscoveryIq::Item &) = default; - +/// Default move-constructor +QXmppDiscoveryIq::Item::Item(QXmppDiscoveryIq::Item &&) = default; QXmppDiscoveryIq::Item::~Item() = default; - /// Default assignment operator QXmppDiscoveryIq::Item &QXmppDiscoveryIq::Item::operator=(const QXmppDiscoveryIq::Item &) = default; +/// Default move-assignment operator +QXmppDiscoveryIq::Item &QXmppDiscoveryIq::Item::operator=(QXmppDiscoveryIq::Item &&) = default; /// /// Returns the jid of the item. @@ -258,11 +262,13 @@ QXmppDiscoveryIq::QXmppDiscoveryIq() /// Default copy-constructor QXmppDiscoveryIq::QXmppDiscoveryIq(const QXmppDiscoveryIq &) = default; - +/// Default move-constructor +QXmppDiscoveryIq::QXmppDiscoveryIq(QXmppDiscoveryIq &&) = default; QXmppDiscoveryIq::~QXmppDiscoveryIq() = default; - /// Default assignment operator QXmppDiscoveryIq &QXmppDiscoveryIq::operator=(const QXmppDiscoveryIq &) = default; +/// Default move-assignment operator +QXmppDiscoveryIq &QXmppDiscoveryIq::operator=(QXmppDiscoveryIq &&) = default; /// /// Returns the features of the service. diff --git a/src/base/QXmppDiscoveryIq.h b/src/base/QXmppDiscoveryIq.h index 0fc6eccf..805d22cf 100644 --- a/src/base/QXmppDiscoveryIq.h +++ b/src/base/QXmppDiscoveryIq.h @@ -22,9 +22,11 @@ public: public: Identity(); Identity(const Identity &other); + Identity(Identity &&); ~Identity(); Identity &operator=(const Identity &other); + Identity &operator=(Identity &&); QString category() const; void setCategory(const QString &category); @@ -47,9 +49,11 @@ public: public: Item(); Item(const Item &); + Item(Item &&); ~Item(); Item &operator=(const Item &); + Item &operator=(Item &&); QString jid() const; void setJid(const QString &jid); @@ -66,9 +70,11 @@ public: QXmppDiscoveryIq(); QXmppDiscoveryIq(const QXmppDiscoveryIq &); + QXmppDiscoveryIq(QXmppDiscoveryIq &&); ~QXmppDiscoveryIq(); QXmppDiscoveryIq &operator=(const QXmppDiscoveryIq &); + QXmppDiscoveryIq &operator=(QXmppDiscoveryIq &&); enum QueryType { InfoQuery, diff --git a/src/base/QXmppGeolocItem.cpp b/src/base/QXmppGeolocItem.cpp index bef54b69..b6bf0b85 100644 --- a/src/base/QXmppGeolocItem.cpp +++ b/src/base/QXmppGeolocItem.cpp @@ -40,11 +40,13 @@ QXmppGeolocItem::QXmppGeolocItem() /// Copy-constructor.
QXmppGeolocItem::QXmppGeolocItem(const QXmppGeolocItem &other) = default;
-
+/// Move-constructor.
+QXmppGeolocItem::QXmppGeolocItem(QXmppGeolocItem &&) = default;
QXmppGeolocItem::~QXmppGeolocItem() = default;
-
/// Assignment operator.
QXmppGeolocItem &QXmppGeolocItem::operator=(const QXmppGeolocItem &other) = default;
+/// Move-assignment operator.
+QXmppGeolocItem &QXmppGeolocItem::operator=(QXmppGeolocItem &&) = default;
///
/// Returns the horizontal GPS error in meters.
diff --git a/src/base/QXmppGeolocItem.h b/src/base/QXmppGeolocItem.h index 5b1148f2..05d42dba 100644 --- a/src/base/QXmppGeolocItem.h +++ b/src/base/QXmppGeolocItem.h @@ -18,9 +18,11 @@ class QXMPP_EXPORT QXmppGeolocItem : public QXmppPubSubItem public: QXmppGeolocItem(); QXmppGeolocItem(const QXmppGeolocItem &other); + QXmppGeolocItem(QXmppGeolocItem &&); ~QXmppGeolocItem(); QXmppGeolocItem &operator=(const QXmppGeolocItem &other); + QXmppGeolocItem &operator=(QXmppGeolocItem &&); std::optional<double> accuracy() const; void setAccuracy(std::optional<double> accuracy); diff --git a/src/base/QXmppHttpUploadIq.cpp b/src/base/QXmppHttpUploadIq.cpp index 520985b8..9553d403 100644 --- a/src/base/QXmppHttpUploadIq.cpp +++ b/src/base/QXmppHttpUploadIq.cpp @@ -26,11 +26,13 @@ QXmppHttpUploadRequestIq::QXmppHttpUploadRequestIq() /// Default copy-constructor QXmppHttpUploadRequestIq::QXmppHttpUploadRequestIq(const QXmppHttpUploadRequestIq &) = default; - +/// Default move-constructor +QXmppHttpUploadRequestIq::QXmppHttpUploadRequestIq(QXmppHttpUploadRequestIq &&) = default; QXmppHttpUploadRequestIq::~QXmppHttpUploadRequestIq() = default; - /// Default assignment operator QXmppHttpUploadRequestIq &QXmppHttpUploadRequestIq::operator=(const QXmppHttpUploadRequestIq &) = default; +/// Default assignment operator +QXmppHttpUploadRequestIq &QXmppHttpUploadRequestIq::operator=(QXmppHttpUploadRequestIq &&) = default; /// /// Returns the file name of the file to be uploaded. @@ -138,11 +140,13 @@ QXmppHttpUploadSlotIq::QXmppHttpUploadSlotIq() /// Default copy-constructor QXmppHttpUploadSlotIq::QXmppHttpUploadSlotIq(const QXmppHttpUploadSlotIq &) = default; - +/// Default move-constructor +QXmppHttpUploadSlotIq::QXmppHttpUploadSlotIq(QXmppHttpUploadSlotIq &&) = default; QXmppHttpUploadSlotIq::~QXmppHttpUploadSlotIq() = default; - /// Default assignment operator QXmppHttpUploadSlotIq &QXmppHttpUploadSlotIq::operator=(const QXmppHttpUploadSlotIq &) = default; +/// Default move-assignment operator +QXmppHttpUploadSlotIq &QXmppHttpUploadSlotIq::operator=(QXmppHttpUploadSlotIq &&) = default; /// /// Returns the URL for uploading via. HTTP PUT. diff --git a/src/base/QXmppHttpUploadIq.h b/src/base/QXmppHttpUploadIq.h index 5c1c2cb4..0a558dad 100644 --- a/src/base/QXmppHttpUploadIq.h +++ b/src/base/QXmppHttpUploadIq.h @@ -15,21 +15,24 @@ class QMimeType; class QXmppHttpUploadRequestIqPrivate; class QXmppHttpUploadSlotIqPrivate; +/// /// \brief Represents an HTTP File Upload IQ for requesting an upload slot as /// defined by \xep{0363}: HTTP File Upload. /// /// \since QXmpp 1.1 /// /// \ingroup Stanzas - +/// class QXMPP_EXPORT QXmppHttpUploadRequestIq : public QXmppIq { public: QXmppHttpUploadRequestIq(); QXmppHttpUploadRequestIq(const QXmppHttpUploadRequestIq &); + QXmppHttpUploadRequestIq(QXmppHttpUploadRequestIq &&); ~QXmppHttpUploadRequestIq() override; QXmppHttpUploadRequestIq &operator=(const QXmppHttpUploadRequestIq &); + QXmppHttpUploadRequestIq &operator=(QXmppHttpUploadRequestIq &&); QString fileName() const; void setFileName(const QString &filename); @@ -52,21 +55,24 @@ private: QSharedDataPointer<QXmppHttpUploadRequestIqPrivate> d; }; +/// /// \brief Represents an HTTP File Upload IQ result for receiving an upload slot as /// defined by \xep{0363}: HTTP File Upload. /// /// \since QXmpp 1.1 /// /// \ingroup Stanzas - +/// class QXMPP_EXPORT QXmppHttpUploadSlotIq : public QXmppIq { public: QXmppHttpUploadSlotIq(); QXmppHttpUploadSlotIq(const QXmppHttpUploadSlotIq &); + QXmppHttpUploadSlotIq(QXmppHttpUploadSlotIq &&); ~QXmppHttpUploadSlotIq() override; QXmppHttpUploadSlotIq &operator=(const QXmppHttpUploadSlotIq &); + QXmppHttpUploadSlotIq &operator=(QXmppHttpUploadSlotIq &&); QUrl putUrl() const; void setPutUrl(const QUrl &putUrl); diff --git a/src/base/QXmppIq.cpp b/src/base/QXmppIq.cpp index efb35396..3d9f5422 100644 --- a/src/base/QXmppIq.cpp +++ b/src/base/QXmppIq.cpp @@ -22,10 +22,11 @@ public: QXmppIq::Type type; }; +/// /// Constructs a QXmppIq with the specified \a type. /// /// \param type - +/// QXmppIq::QXmppIq(QXmppIq::Type type) : QXmppStanza(), d(new QXmppIqPrivate) { @@ -34,37 +35,29 @@ QXmppIq::QXmppIq(QXmppIq::Type type) } /// Constructs a copy of \a other. - -QXmppIq::QXmppIq(const QXmppIq &other) - : QXmppStanza(other), d(other.d) -{ -} - -QXmppIq::~QXmppIq() -{ -} +QXmppIq::QXmppIq(const QXmppIq &other) = default; +/// Default move-constructor. +QXmppIq::QXmppIq(QXmppIq &&) = default; +QXmppIq::~QXmppIq() = default; /// Assigns \a other to this IQ. +QXmppIq &QXmppIq::operator=(const QXmppIq &other) = default; +/// Move-assignment operator. +QXmppIq &QXmppIq::operator=(QXmppIq &&) = default; -QXmppIq &QXmppIq::operator=(const QXmppIq &other) -{ - QXmppStanza::operator=(other); - d = other.d; - return *this; -} - +/// /// Returns the IQ's type. /// - QXmppIq::Type QXmppIq::type() const { return d->type; } +/// /// Sets the IQ's type. /// /// \param type - +/// void QXmppIq::setType(QXmppIq::Type type) { d->type = type; diff --git a/src/base/QXmppIq.h b/src/base/QXmppIq.h index 6e6f4bd6..8bdd5212 100644 --- a/src/base/QXmppIq.h +++ b/src/base/QXmppIq.h @@ -32,9 +32,11 @@ public: QXmppIq(QXmppIq::Type type = QXmppIq::Get); QXmppIq(const QXmppIq &other); + QXmppIq(QXmppIq &&); ~QXmppIq() override; QXmppIq &operator=(const QXmppIq &other); + QXmppIq &operator=(QXmppIq &&); QXmppIq::Type type() const; void setType(QXmppIq::Type); diff --git a/src/base/QXmppJingleIq.cpp b/src/base/QXmppJingleIq.cpp index 16537b1e..7b7def33 100644 --- a/src/base/QXmppJingleIq.cpp +++ b/src/base/QXmppJingleIq.cpp @@ -147,34 +147,21 @@ QXmppJingleIqContentPrivate::QXmppJingleIqContentPrivate() } /// Constructs an empty content. - QXmppJingleIq::Content::Content() : d(new QXmppJingleIqContentPrivate()) { } -/// Constructs a copy of other. -/// -/// \param other - -QXmppJingleIq::Content::Content(const QXmppJingleIq::Content &other) - : d(other.d) -{ -} - -/// Assigns the other content to this one. -/// -/// \param other - -QXmppJingleIq::Content &QXmppJingleIq::Content::operator=(const QXmppJingleIq::Content &other) -{ - d = other.d; - return *this; -} +/// Copy-constructor. +QXmppJingleIq::Content::Content(const QXmppJingleIq::Content &other) = default; +/// Move-constructor. +QXmppJingleIq::Content::Content(QXmppJingleIq::Content &&) = default; +/// Assignment operator. +QXmppJingleIq::Content &QXmppJingleIq::Content::operator=(const QXmppJingleIq::Content &) = default; +/// Move-assignment operator. +QXmppJingleIq::Content &QXmppJingleIq::Content::operator=(QXmppJingleIq::Content &&) = default; -QXmppJingleIq::Content::~Content() -{ -} +QXmppJingleIq::Content::~Content() = default; QString QXmppJingleIq::Content::creator() const { @@ -715,37 +702,26 @@ QXmppJingleIqPrivate::QXmppJingleIqPrivate() } /// Constructs a QXmppJingleIq. - QXmppJingleIq::QXmppJingleIq() : d(new QXmppJingleIqPrivate()) { } -/// Constructs a copy of other. -/// -/// \param other +/// Copy-constructor. +QXmppJingleIq::QXmppJingleIq(const QXmppJingleIq &) = default; +/// Move-constructor. +QXmppJingleIq::QXmppJingleIq(QXmppJingleIq &&) = default; -QXmppJingleIq::QXmppJingleIq(const QXmppJingleIq &other) - : QXmppIq(other), d(other.d) -{ -} +QXmppJingleIq::~QXmppJingleIq() = default; -QXmppJingleIq::~QXmppJingleIq() -{ -} +/// Assignment operator. +QXmppJingleIq &QXmppJingleIq::operator=(const QXmppJingleIq &) = default; +/// Move-assignment operator. +QXmppJingleIq &QXmppJingleIq::operator=(QXmppJingleIq &&) = default; -/// Assigns the other Jingle IQ to this one. /// -/// \param other - -QXmppJingleIq &QXmppJingleIq::operator=(const QXmppJingleIq &other) -{ - d = other.d; - return *this; -} - /// Returns the Jingle IQ's action. - +/// QXmppJingleIq::Action QXmppJingleIq::action() const { return d->action; @@ -951,35 +927,23 @@ QXmppJingleCandidatePrivate::QXmppJingleCandidatePrivate() { } +/// /// Constructs an empty candidate. - +/// QXmppJingleCandidate::QXmppJingleCandidate() : d(new QXmppJingleCandidatePrivate()) { } -/// Constructs a copy of other. -/// -/// \param other - -QXmppJingleCandidate::QXmppJingleCandidate(const QXmppJingleCandidate &other) - : d(other.d) -{ -} - -QXmppJingleCandidate::~QXmppJingleCandidate() -{ -} - -/// Assigns the other candidate to this one. -/// -/// \param other - -QXmppJingleCandidate &QXmppJingleCandidate::operator=(const QXmppJingleCandidate &other) -{ - d = other.d; - return *this; -} +/// Copy-constructor. +QXmppJingleCandidate::QXmppJingleCandidate(const QXmppJingleCandidate &other) = default; +/// Move-constructor. +QXmppJingleCandidate::QXmppJingleCandidate(QXmppJingleCandidate &&) = default; +QXmppJingleCandidate::~QXmppJingleCandidate() = default; +/// Assignment operator. +QXmppJingleCandidate &QXmppJingleCandidate::operator=(const QXmppJingleCandidate &other) = default; +/// Move-assignment operator. +QXmppJingleCandidate &QXmppJingleCandidate::operator=(QXmppJingleCandidate &&) = default; /// Returns the candidate's component ID. diff --git a/src/base/QXmppJingleIq.h b/src/base/QXmppJingleIq.h index dd1d8f31..8ea6deeb 100644 --- a/src/base/QXmppJingleIq.h +++ b/src/base/QXmppJingleIq.h @@ -14,10 +14,10 @@ class QXmppJingleIqContentPrivate; class QXmppJingleIqPrivate; class QXmppJinglePayloadTypePrivate; +/// /// \brief The QXmppJinglePayloadType class represents a payload type /// as specified by \xep{0167}: Jingle RTP Sessions and RFC 5245. /// - class QXMPP_EXPORT QXmppJinglePayloadType { public: @@ -58,10 +58,10 @@ private: QSharedDataPointer<QXmppJinglePayloadTypePrivate> d; }; +/// /// \brief The QXmppJingleCandidate class represents a transport candidate /// as specified by \xep{0176}: Jingle ICE-UDP Transport Method. /// - class QXMPP_EXPORT QXmppJingleCandidate { public: @@ -78,9 +78,11 @@ public: QXmppJingleCandidate(); QXmppJingleCandidate(const QXmppJingleCandidate &other); + QXmppJingleCandidate(QXmppJingleCandidate &&); ~QXmppJingleCandidate(); QXmppJingleCandidate &operator=(const QXmppJingleCandidate &other); + QXmppJingleCandidate &operator=(QXmppJingleCandidate &&); int component() const; void setComponent(int component); @@ -126,11 +128,12 @@ private: QSharedDataPointer<QXmppJingleCandidatePrivate> d; }; +/// /// \brief The QXmppJingleIq class represents an IQ used for initiating media /// sessions as specified by \xep{0166}: Jingle. /// /// \ingroup Stanzas - +/// class QXMPP_EXPORT QXmppJingleIq : public QXmppIq { public: @@ -157,15 +160,17 @@ public: /// /// The QXmppJingleIq::Content class represents the "content" element of a /// QXmppJingleIq. - + /// class QXMPP_EXPORT Content { public: Content(); Content(const QXmppJingleIq::Content &other); + Content(QXmppJingleIq::Content &&); ~Content(); Content &operator=(const Content &other); + Content &operator=(Content &&); QString creator() const; void setCreator(const QString &creator); @@ -223,7 +228,7 @@ public: /// /// The QXmppJingleIq::Reason class represents the "reason" element of a /// QXmppJingleIq. - + /// class QXMPP_EXPORT Reason { public: @@ -269,9 +274,11 @@ public: QXmppJingleIq(); QXmppJingleIq(const QXmppJingleIq &other); + QXmppJingleIq(QXmppJingleIq &&); ~QXmppJingleIq() override; QXmppJingleIq &operator=(const QXmppJingleIq &other); + QXmppJingleIq &operator=(QXmppJingleIq &&); Action action() const; void setAction(Action action); diff --git a/src/base/QXmppMamIq.cpp b/src/base/QXmppMamIq.cpp index 3fd3fe42..f49d8d6d 100644 --- a/src/base/QXmppMamIq.cpp +++ b/src/base/QXmppMamIq.cpp @@ -36,11 +36,13 @@ QXmppMamQueryIq::QXmppMamQueryIq() /// Default copy constructor QXmppMamQueryIq::QXmppMamQueryIq(const QXmppMamQueryIq &) = default; - +/// Default move constructor +QXmppMamQueryIq::QXmppMamQueryIq(QXmppMamQueryIq &&) = default; QXmppMamQueryIq::~QXmppMamQueryIq() = default; - /// Default assignemnt operator QXmppMamQueryIq &QXmppMamQueryIq::operator=(const QXmppMamQueryIq &) = default; +/// Default move-assignemnt operator +QXmppMamQueryIq &QXmppMamQueryIq::operator=(QXmppMamQueryIq &&) = default; /// /// Returns the form that specifies the query. @@ -181,13 +183,15 @@ QXmppMamResultIq::QXmppMamResultIq() d->complete = false; } +/// Default move constructor +QXmppMamResultIq::QXmppMamResultIq(QXmppMamResultIq &&) = default; /// Default copy constructor QXmppMamResultIq::QXmppMamResultIq(const QXmppMamResultIq &) = default; - QXmppMamResultIq::~QXmppMamResultIq() = default; - /// Default assignemnt operator QXmppMamResultIq &QXmppMamResultIq::operator=(const QXmppMamResultIq &) = default; +/// Default move-assignemnt operator +QXmppMamResultIq &QXmppMamResultIq::operator=(QXmppMamResultIq &&) = default; /// /// Returns the result set reply for result set management. diff --git a/src/base/QXmppMamIq.h b/src/base/QXmppMamIq.h index 6d9a9fa5..6a1df144 100644 --- a/src/base/QXmppMamIq.h +++ b/src/base/QXmppMamIq.h @@ -19,9 +19,11 @@ class QXmppMamQueryIq : public QXmppIq public: QXmppMamQueryIq(); QXmppMamQueryIq(const QXmppMamQueryIq &); + QXmppMamQueryIq(QXmppMamQueryIq &&); ~QXmppMamQueryIq(); QXmppMamQueryIq &operator=(const QXmppMamQueryIq &); + QXmppMamQueryIq &operator=(QXmppMamQueryIq &&); QXmppDataForm form() const; void setForm(const QXmppDataForm &form); @@ -49,9 +51,11 @@ class QXmppMamResultIq : public QXmppIq public: QXmppMamResultIq(); QXmppMamResultIq(const QXmppMamResultIq &); + QXmppMamResultIq(QXmppMamResultIq &&); ~QXmppMamResultIq(); QXmppMamResultIq &operator=(const QXmppMamResultIq &); + QXmppMamResultIq &operator=(QXmppMamResultIq &&); QXmppResultSetReply resultSetReply() const; void setResultSetReply(const QXmppResultSetReply &resultSetReply); diff --git a/src/base/QXmppMessage.cpp b/src/base/QXmppMessage.cpp index ee03cbbf..d583fd7e 100644 --- a/src/base/QXmppMessage.cpp +++ b/src/base/QXmppMessage.cpp @@ -180,14 +180,14 @@ QXmppMessage::QXmppMessage(const QString &from, const QString &to, const QString } /// Constructs a copy of \a other. - QXmppMessage::QXmppMessage(const QXmppMessage &other) = default; - +/// Move-constructor. +QXmppMessage::QXmppMessage(QXmppMessage &&) = default; QXmppMessage::~QXmppMessage() = default; - -/// Assigns \a other to this message. - +/// Assignment operator. QXmppMessage &QXmppMessage::operator=(const QXmppMessage &other) = default; +/// Move-assignment operator. +QXmppMessage &QXmppMessage::operator=(QXmppMessage &&) = default; /// /// Indicates if the QXmppStanza is a stanza in the XMPP sense (i. e. a message, diff --git a/src/base/QXmppMessage.h b/src/base/QXmppMessage.h index 6daf642a..aa4d8611 100644 --- a/src/base/QXmppMessage.h +++ b/src/base/QXmppMessage.h @@ -94,9 +94,11 @@ public: const QString &body = QString(), const QString &thread = QString()); QXmppMessage(const QXmppMessage &other); + QXmppMessage(QXmppMessage &&); ~QXmppMessage() override; QXmppMessage &operator=(const QXmppMessage &other); + QXmppMessage &operator=(QXmppMessage &&); bool isXmppStanza() const override; diff --git a/src/base/QXmppMixInfoItem.h b/src/base/QXmppMixInfoItem.h index 53556e10..9a28decb 100644 --- a/src/base/QXmppMixInfoItem.h +++ b/src/base/QXmppMixInfoItem.h @@ -14,9 +14,11 @@ class QXMPP_EXPORT QXmppMixInfoItem : public QXmppPubSubItem public: QXmppMixInfoItem(); QXmppMixInfoItem(const QXmppMixInfoItem &); + QXmppMixInfoItem(QXmppMixInfoItem &&); ~QXmppMixInfoItem(); QXmppMixInfoItem &operator=(const QXmppMixInfoItem &); + QXmppMixInfoItem &operator=(QXmppMixInfoItem &&); const QString &name() const; void setName(QString); diff --git a/src/base/QXmppMixInvitation.cpp b/src/base/QXmppMixInvitation.cpp index 21ba7d73..b1a39179 100644 --- a/src/base/QXmppMixInvitation.cpp +++ b/src/base/QXmppMixInvitation.cpp @@ -27,19 +27,14 @@ QXmppMixInvitation::QXmppMixInvitation() { } -/// -/// Copy constructor -/// +/// Copy constructor. QXmppMixInvitation::QXmppMixInvitation(const QXmppMixInvitation &other) = default; - -/// +/// Copy constructor. +QXmppMixInvitation::QXmppMixInvitation(QXmppMixInvitation &&) = default; /// Default assignment operator. -/// QXmppMixInvitation &QXmppMixInvitation::operator=(const QXmppMixInvitation &other) = default; - -/// -/// Destructor -/// +/// Default assignment operator. +QXmppMixInvitation &QXmppMixInvitation::operator=(QXmppMixInvitation &&) = default; QXmppMixInvitation::~QXmppMixInvitation() = default; /// diff --git a/src/base/QXmppMixInvitation.h b/src/base/QXmppMixInvitation.h index a5932a49..e01d81ac 100644 --- a/src/base/QXmppMixInvitation.h +++ b/src/base/QXmppMixInvitation.h @@ -25,9 +25,11 @@ class QXMPP_EXPORT QXmppMixInvitation public: QXmppMixInvitation(); QXmppMixInvitation(const QXmppMixInvitation &other); + QXmppMixInvitation(QXmppMixInvitation &&); ~QXmppMixInvitation(); QXmppMixInvitation &operator=(const QXmppMixInvitation &other); + QXmppMixInvitation &operator=(QXmppMixInvitation &&); QString inviterJid() const; void setInviterJid(const QString &inviterJid); diff --git a/src/base/QXmppMixIq.cpp b/src/base/QXmppMixIq.cpp index 6446850b..8d28bc39 100644 --- a/src/base/QXmppMixIq.cpp +++ b/src/base/QXmppMixIq.cpp @@ -40,11 +40,13 @@ QXmppMixIq::QXmppMixIq() /// Default copy-constructor QXmppMixIq::QXmppMixIq(const QXmppMixIq &) = default; - +/// Default move-constructor +QXmppMixIq::QXmppMixIq(QXmppMixIq &&) = default; QXmppMixIq::~QXmppMixIq() = default; - /// Default assignment operator QXmppMixIq &QXmppMixIq::operator=(const QXmppMixIq &) = default; +/// Default move-assignment operator +QXmppMixIq &QXmppMixIq::operator=(QXmppMixIq &&) = default; /// Returns the channel JID. It also contains a participant id for Join/ /// ClientJoin results. diff --git a/src/base/QXmppMixIq.h b/src/base/QXmppMixIq.h index 301397a9..a394a80d 100644 --- a/src/base/QXmppMixIq.h +++ b/src/base/QXmppMixIq.h @@ -11,6 +11,7 @@ class QXmppMixIqPrivate; +/// /// \brief The QXmppMixIq class represents an IQ used to do actions on a MIX /// channel as defined by \xep{0369}: Mediated Information eXchange (MIX) and /// \xep{0405}: Mediated Information eXchange (MIX): Participant Server @@ -19,7 +20,7 @@ class QXmppMixIqPrivate; /// \since QXmpp 1.1 /// /// \ingroup Stanzas - +/// class QXMPP_EXPORT QXmppMixIq : public QXmppIq { public: @@ -38,9 +39,11 @@ public: QXmppMixIq(); QXmppMixIq(const QXmppMixIq &); + QXmppMixIq(QXmppMixIq &&); ~QXmppMixIq() override; QXmppMixIq &operator=(const QXmppMixIq &); + QXmppMixIq &operator=(QXmppMixIq &&); QXmppMixIq::Type actionType() const; void setActionType(QXmppMixIq::Type); diff --git a/src/base/QXmppMixItems.cpp b/src/base/QXmppMixItems.cpp index 35ed3335..e08dd3f2 100644 --- a/src/base/QXmppMixItems.cpp +++ b/src/base/QXmppMixItems.cpp @@ -76,10 +76,12 @@ QXmppMixInfoItem::QXmppMixInfoItem() /// Default copy-constructor QXmppMixInfoItem::QXmppMixInfoItem(const QXmppMixInfoItem &) = default; - +/// Default move-constructor +QXmppMixInfoItem::QXmppMixInfoItem(QXmppMixInfoItem &&) = default; /// Default assignment operator QXmppMixInfoItem &QXmppMixInfoItem::operator=(const QXmppMixInfoItem &) = default; - +/// Default move-assignment operator +QXmppMixInfoItem &QXmppMixInfoItem::operator=(QXmppMixInfoItem &&) = default; QXmppMixInfoItem::~QXmppMixInfoItem() = default; /// @@ -196,10 +198,12 @@ QXmppMixParticipantItem::QXmppMixParticipantItem() /// Default copy-constructor QXmppMixParticipantItem::QXmppMixParticipantItem(const QXmppMixParticipantItem &) = default; - +/// Default move-constructor +QXmppMixParticipantItem::QXmppMixParticipantItem(QXmppMixParticipantItem &&) = default; /// Default assignment operator QXmppMixParticipantItem &QXmppMixParticipantItem::operator=(const QXmppMixParticipantItem &) = default; - +/// Default move-assignment operator +QXmppMixParticipantItem &QXmppMixParticipantItem::operator=(QXmppMixParticipantItem &&) = default; QXmppMixParticipantItem::~QXmppMixParticipantItem() = default; /// diff --git a/src/base/QXmppMixParticipantItem.h b/src/base/QXmppMixParticipantItem.h index 1320d467..f0f2abaa 100644 --- a/src/base/QXmppMixParticipantItem.h +++ b/src/base/QXmppMixParticipantItem.h @@ -14,9 +14,11 @@ class QXMPP_EXPORT QXmppMixParticipantItem : public QXmppPubSubItem public: QXmppMixParticipantItem(); QXmppMixParticipantItem(const QXmppMixParticipantItem &); + QXmppMixParticipantItem(QXmppMixParticipantItem &&); ~QXmppMixParticipantItem(); QXmppMixParticipantItem &operator=(const QXmppMixParticipantItem &); + QXmppMixParticipantItem &operator=(QXmppMixParticipantItem &&); const QString &nick() const; void setNick(QString); diff --git a/src/base/QXmppPresence.cpp b/src/base/QXmppPresence.cpp index 25c6410c..202dd2a3 100644 --- a/src/base/QXmppPresence.cpp +++ b/src/base/QXmppPresence.cpp @@ -76,27 +76,25 @@ QXmppPresencePrivate::QXmppPresencePrivate() { } +/// /// Constructs a QXmppPresence. /// -/// \param type - QXmppPresence::QXmppPresence(QXmppPresence::Type type) : d(new QXmppPresencePrivate) { d->type = type; } -/// Constructs a copy of \a other. - +/// Copy-constructor. QXmppPresence::QXmppPresence(const QXmppPresence &other) = default; - +/// Move-constructor. +QXmppPresence::QXmppPresence(QXmppPresence &&) = default; /// Destroys a QXmppPresence. - QXmppPresence::~QXmppPresence() = default; - -/// Assigns \a other to this presence. - +/// Assignemnt operator. QXmppPresence &QXmppPresence::operator=(const QXmppPresence &other) = default; +/// Move-assignemnt operator. +QXmppPresence &QXmppPresence::operator=(QXmppPresence &&) = default; /// /// Indicates if the QXmppStanza is a stanza in the XMPP sence (i. e. a message, diff --git a/src/base/QXmppPresence.h b/src/base/QXmppPresence.h index 6aec68ed..f704ddc9 100644 --- a/src/base/QXmppPresence.h +++ b/src/base/QXmppPresence.h @@ -10,9 +10,11 @@ class QXmppPresencePrivate; +/// /// \brief The QXmppPresence class represents an XMPP presence stanza. /// /// \ingroup Stanzas +/// class QXMPP_EXPORT QXmppPresence : public QXmppStanza { public: @@ -52,9 +54,11 @@ public: QXmppPresence(QXmppPresence::Type type = QXmppPresence::Available); QXmppPresence(const QXmppPresence &other); + QXmppPresence(QXmppPresence &&); ~QXmppPresence() override; QXmppPresence &operator=(const QXmppPresence &other); + QXmppPresence &operator=(QXmppPresence &&); bool isXmppStanza() const override; diff --git a/src/base/QXmppPubSubAffiliation.cpp b/src/base/QXmppPubSubAffiliation.cpp index becf3c83..0076b6ff 100644 --- a/src/base/QXmppPubSubAffiliation.cpp +++ b/src/base/QXmppPubSubAffiliation.cpp @@ -64,11 +64,13 @@ QXmppPubSubAffiliation::QXmppPubSubAffiliation(Affiliation type, /// Copy constructor. QXmppPubSubAffiliation::QXmppPubSubAffiliation(const QXmppPubSubAffiliation &) = default; - +/// Move-constructor. +QXmppPubSubAffiliation::QXmppPubSubAffiliation(QXmppPubSubAffiliation &&) = default; QXmppPubSubAffiliation::~QXmppPubSubAffiliation() = default; - /// Assignment operator. QXmppPubSubAffiliation &QXmppPubSubAffiliation::operator=(const QXmppPubSubAffiliation &) = default; +/// Move-assignment operator. +QXmppPubSubAffiliation &QXmppPubSubAffiliation::operator=(QXmppPubSubAffiliation &&) = default; /// /// Returns the type of the affiliation. diff --git a/src/base/QXmppPubSubAffiliation.h b/src/base/QXmppPubSubAffiliation.h index 839b7745..e74db0e6 100644 --- a/src/base/QXmppPubSubAffiliation.h +++ b/src/base/QXmppPubSubAffiliation.h @@ -34,9 +34,11 @@ public: const QString &node = {}, const QString &jid = {}); QXmppPubSubAffiliation(const QXmppPubSubAffiliation &); + QXmppPubSubAffiliation(QXmppPubSubAffiliation &&); ~QXmppPubSubAffiliation(); QXmppPubSubAffiliation &operator=(const QXmppPubSubAffiliation &); + QXmppPubSubAffiliation &operator=(QXmppPubSubAffiliation &&); Affiliation type() const; void setType(Affiliation type); diff --git a/src/base/QXmppPubSubEvent.cpp b/src/base/QXmppPubSubEvent.cpp index a0809389..97c5cf61 100644 --- a/src/base/QXmppPubSubEvent.cpp +++ b/src/base/QXmppPubSubEvent.cpp @@ -98,11 +98,13 @@ QXmppPubSubEventBase::QXmppPubSubEventBase(EventType type, const QString &node) /// Default copy-constructor. QXmppPubSubEventBase::QXmppPubSubEventBase(const QXmppPubSubEventBase &other) = default; - +/// Default move-constructor. +QXmppPubSubEventBase::QXmppPubSubEventBase(QXmppPubSubEventBase &&) = default; QXmppPubSubEventBase::~QXmppPubSubEventBase() = default; - /// Default assignment operator. QXmppPubSubEventBase &QXmppPubSubEventBase::operator=(const QXmppPubSubEventBase &other) = default; +/// Default move-assignment operator. +QXmppPubSubEventBase &QXmppPubSubEventBase::operator=(QXmppPubSubEventBase &&) = default; /// /// Returns the event type of the PubSub event. diff --git a/src/base/QXmppPubSubEvent.h b/src/base/QXmppPubSubEvent.h index f1113a27..eca43fb6 100644 --- a/src/base/QXmppPubSubEvent.h +++ b/src/base/QXmppPubSubEvent.h @@ -33,9 +33,11 @@ public: QXmppPubSubEventBase(EventType = Items, const QString &node = {}); QXmppPubSubEventBase(const QXmppPubSubEventBase &other); + QXmppPubSubEventBase(QXmppPubSubEventBase &&); virtual ~QXmppPubSubEventBase(); QXmppPubSubEventBase &operator=(const QXmppPubSubEventBase &other); + QXmppPubSubEventBase &operator=(QXmppPubSubEventBase &&); EventType eventType() const; void setEventType(EventType); diff --git a/src/base/QXmppPubSubItem.cpp b/src/base/QXmppPubSubItem.cpp index e6c108d6..f87c5d6e 100644 --- a/src/base/QXmppPubSubItem.cpp +++ b/src/base/QXmppPubSubItem.cpp @@ -61,11 +61,13 @@ QXmppPubSubItem::QXmppPubSubItem(const QString &id, const QString &publisher) /// Default copy-constructor QXmppPubSubItem::QXmppPubSubItem(const QXmppPubSubItem &iq) = default; - +/// Default move-constructor +QXmppPubSubItem::QXmppPubSubItem(QXmppPubSubItem &&) = default; QXmppPubSubItem::~QXmppPubSubItem() = default; - /// Default assignment operator QXmppPubSubItem &QXmppPubSubItem::operator=(const QXmppPubSubItem &iq) = default; +/// Default move-assignment operator +QXmppPubSubItem &QXmppPubSubItem::operator=(QXmppPubSubItem &&iq) = default; /// /// Returns the ID of the PubSub item. diff --git a/src/base/QXmppPubSubItem.h b/src/base/QXmppPubSubItem.h index 2228dcd2..e585de9d 100644 --- a/src/base/QXmppPubSubItem.h +++ b/src/base/QXmppPubSubItem.h @@ -20,9 +20,11 @@ class QXMPP_EXPORT QXmppPubSubItem public: QXmppPubSubItem(const QString &id = {}, const QString &publisher = {}); QXmppPubSubItem(const QXmppPubSubItem &); + QXmppPubSubItem(QXmppPubSubItem &&); virtual ~QXmppPubSubItem(); QXmppPubSubItem &operator=(const QXmppPubSubItem &); + QXmppPubSubItem &operator=(QXmppPubSubItem &&); QString id() const; void setId(const QString &id); diff --git a/src/base/QXmppPubSubMetadata.cpp b/src/base/QXmppPubSubMetadata.cpp index 3b5a3a0a..f30a35ee 100644 --- a/src/base/QXmppPubSubMetadata.cpp +++ b/src/base/QXmppPubSubMetadata.cpp @@ -56,10 +56,10 @@ QXmppPubSubMetadata::QXmppPubSubMetadata() } QXmppPubSubMetadata::QXmppPubSubMetadata(const QXmppPubSubMetadata &) = default; - +QXmppPubSubMetadata::QXmppPubSubMetadata(QXmppPubSubMetadata &&) = default; QXmppPubSubMetadata::~QXmppPubSubMetadata() = default; - QXmppPubSubMetadata &QXmppPubSubMetadata::operator=(const QXmppPubSubMetadata &) = default; +QXmppPubSubMetadata &QXmppPubSubMetadata::operator=(QXmppPubSubMetadata &&) = default; QStringList QXmppPubSubMetadata::contactJids() const { diff --git a/src/base/QXmppPubSubMetadata.h b/src/base/QXmppPubSubMetadata.h index ac830164..fd9b8321 100644 --- a/src/base/QXmppPubSubMetadata.h +++ b/src/base/QXmppPubSubMetadata.h @@ -25,9 +25,11 @@ public: QXmppPubSubMetadata(); QXmppPubSubMetadata(const QXmppPubSubMetadata &); + QXmppPubSubMetadata(QXmppPubSubMetadata &&); ~QXmppPubSubMetadata(); QXmppPubSubMetadata &operator=(const QXmppPubSubMetadata &); + QXmppPubSubMetadata &operator=(QXmppPubSubMetadata &&); QStringList contactJids() const; void setContactJids(const QStringList &contactJids); diff --git a/src/base/QXmppPubSubNodeConfig.cpp b/src/base/QXmppPubSubNodeConfig.cpp index 6b74d158..2f9408a6 100644 --- a/src/base/QXmppPubSubNodeConfig.cpp +++ b/src/base/QXmppPubSubNodeConfig.cpp @@ -272,10 +272,10 @@ QXmppPubSubNodeConfig::QXmppPubSubNodeConfig() } QXmppPubSubNodeConfig::QXmppPubSubNodeConfig(const QXmppPubSubNodeConfig &) = default; - +QXmppPubSubNodeConfig::QXmppPubSubNodeConfig(QXmppPubSubNodeConfig &&) = default; QXmppPubSubNodeConfig::~QXmppPubSubNodeConfig() = default; - QXmppPubSubNodeConfig &QXmppPubSubNodeConfig::operator=(const QXmppPubSubNodeConfig &) = default; +QXmppPubSubNodeConfig &QXmppPubSubNodeConfig::operator=(QXmppPubSubNodeConfig &&) = default; std::optional<QXmppPubSubNodeConfig::AccessModel> QXmppPubSubNodeConfig::accessModel() const { diff --git a/src/base/QXmppPubSubNodeConfig.h b/src/base/QXmppPubSubNodeConfig.h index bb79cd93..383b59ee 100644 --- a/src/base/QXmppPubSubNodeConfig.h +++ b/src/base/QXmppPubSubNodeConfig.h @@ -82,9 +82,11 @@ public: QXmppPubSubNodeConfig(); QXmppPubSubNodeConfig(const QXmppPubSubNodeConfig &); + QXmppPubSubNodeConfig(QXmppPubSubNodeConfig &&); ~QXmppPubSubNodeConfig(); QXmppPubSubNodeConfig &operator=(const QXmppPubSubNodeConfig &); + QXmppPubSubNodeConfig &operator=(QXmppPubSubNodeConfig &&); std::optional<AccessModel> accessModel() const; void setAccessModel(std::optional<AccessModel> accessModel); diff --git a/src/base/QXmppPubSubSubAuthorization.cpp b/src/base/QXmppPubSubSubAuthorization.cpp index 9905e640..4b14deba 100644 --- a/src/base/QXmppPubSubSubAuthorization.cpp +++ b/src/base/QXmppPubSubSubAuthorization.cpp @@ -48,11 +48,13 @@ QXmppPubSubSubAuthorization::QXmppPubSubSubAuthorization() /// Copy-constructor. QXmppPubSubSubAuthorization::QXmppPubSubSubAuthorization(const QXmppPubSubSubAuthorization &) = default; - +/// Move-constructor. +QXmppPubSubSubAuthorization::QXmppPubSubSubAuthorization(QXmppPubSubSubAuthorization &&) = default; QXmppPubSubSubAuthorization::~QXmppPubSubSubAuthorization() = default; - /// Assignment operator. QXmppPubSubSubAuthorization &QXmppPubSubSubAuthorization::operator=(const QXmppPubSubSubAuthorization &) = default; +/// Move-assignment operator. +QXmppPubSubSubAuthorization &QXmppPubSubSubAuthorization::operator=(QXmppPubSubSubAuthorization &&) = default; /// /// Returns whether the subscription is allowed. diff --git a/src/base/QXmppPubSubSubAuthorization.h b/src/base/QXmppPubSubSubAuthorization.h index fdc23b3a..753f628a 100644 --- a/src/base/QXmppPubSubSubAuthorization.h +++ b/src/base/QXmppPubSubSubAuthorization.h @@ -16,9 +16,11 @@ public: QXmppPubSubSubAuthorization(); QXmppPubSubSubAuthorization(const QXmppPubSubSubAuthorization &); + QXmppPubSubSubAuthorization(QXmppPubSubSubAuthorization &&); ~QXmppPubSubSubAuthorization(); QXmppPubSubSubAuthorization &operator=(const QXmppPubSubSubAuthorization &); + QXmppPubSubSubAuthorization &operator=(QXmppPubSubSubAuthorization &&); std::optional<bool> allowSubscription() const; void setAllowSubscription(std::optional<bool> allowSubscription); diff --git a/src/base/QXmppPubSubSubscribeOptions.cpp b/src/base/QXmppPubSubSubscribeOptions.cpp index e017bac8..439c9a59 100644 --- a/src/base/QXmppPubSubSubscribeOptions.cpp +++ b/src/base/QXmppPubSubSubscribeOptions.cpp @@ -78,10 +78,10 @@ QXmppPubSubSubscribeOptions::QXmppPubSubSubscribeOptions() } QXmppPubSubSubscribeOptions::QXmppPubSubSubscribeOptions(const QXmppPubSubSubscribeOptions &) = default; - +QXmppPubSubSubscribeOptions::QXmppPubSubSubscribeOptions(QXmppPubSubSubscribeOptions &&) = default; QXmppPubSubSubscribeOptions::~QXmppPubSubSubscribeOptions() = default; - QXmppPubSubSubscribeOptions &QXmppPubSubSubscribeOptions::operator=(const QXmppPubSubSubscribeOptions &) = default; +QXmppPubSubSubscribeOptions &QXmppPubSubSubscribeOptions::operator=(QXmppPubSubSubscribeOptions &&) = default; std::optional<bool> QXmppPubSubSubscribeOptions::notificationsEnabled() const { diff --git a/src/base/QXmppPubSubSubscribeOptions.h b/src/base/QXmppPubSubSubscribeOptions.h index f365356a..0b46443d 100644 --- a/src/base/QXmppPubSubSubscribeOptions.h +++ b/src/base/QXmppPubSubSubscribeOptions.h @@ -47,9 +47,11 @@ public: QXmppPubSubSubscribeOptions(); QXmppPubSubSubscribeOptions(const QXmppPubSubSubscribeOptions &); + QXmppPubSubSubscribeOptions(QXmppPubSubSubscribeOptions &&); virtual ~QXmppPubSubSubscribeOptions(); QXmppPubSubSubscribeOptions &operator=(const QXmppPubSubSubscribeOptions &); + QXmppPubSubSubscribeOptions &operator=(QXmppPubSubSubscribeOptions &&); std::optional<bool> notificationsEnabled() const; void setNotificationsEnabled(std::optional<bool> notifying); diff --git a/src/base/QXmppPubSubSubscription.cpp b/src/base/QXmppPubSubSubscription.cpp index 7265aeac..b0dd53c3 100644 --- a/src/base/QXmppPubSubSubscription.cpp +++ b/src/base/QXmppPubSubSubscription.cpp @@ -105,11 +105,13 @@ QXmppPubSubSubscription::QXmppPubSubSubscription(const QString &jid, /// Copy contructor. QXmppPubSubSubscription::QXmppPubSubSubscription(const QXmppPubSubSubscription &) = default; - +/// Move contructor. +QXmppPubSubSubscription::QXmppPubSubSubscription(QXmppPubSubSubscription &&) = default; QXmppPubSubSubscription::~QXmppPubSubSubscription() = default; - /// Copy assignment operator. QXmppPubSubSubscription &QXmppPubSubSubscription::operator=(const QXmppPubSubSubscription &) = default; +/// Move-assignment operator. +QXmppPubSubSubscription &QXmppPubSubSubscription::operator=(QXmppPubSubSubscription &&) = default; /// /// Returns the JID of the user of this subscription. diff --git a/src/base/QXmppPubSubSubscription.h b/src/base/QXmppPubSubSubscription.h index cdc14c64..02e0af99 100644 --- a/src/base/QXmppPubSubSubscription.h +++ b/src/base/QXmppPubSubSubscription.h @@ -59,9 +59,11 @@ public: ConfigurationSupport configurationSupport = Unavailable, const QDateTime &expiry = {}); QXmppPubSubSubscription(const QXmppPubSubSubscription &); + QXmppPubSubSubscription(QXmppPubSubSubscription &&); ~QXmppPubSubSubscription(); QXmppPubSubSubscription &operator=(const QXmppPubSubSubscription &); + QXmppPubSubSubscription &operator=(QXmppPubSubSubscription &&); QString jid() const; void setJid(const QString &jid); diff --git a/src/base/QXmppPushEnableIq.cpp b/src/base/QXmppPushEnableIq.cpp index b4f32263..dc1fab5a 100644 --- a/src/base/QXmppPushEnableIq.cpp +++ b/src/base/QXmppPushEnableIq.cpp @@ -27,11 +27,13 @@ QXmppPushEnableIq::QXmppPushEnableIq() /// Default copy-constructor QXmppPushEnableIq::QXmppPushEnableIq(const QXmppPushEnableIq &) = default; - +/// Default move-constructor +QXmppPushEnableIq::QXmppPushEnableIq(QXmppPushEnableIq &&) = default; QXmppPushEnableIq::~QXmppPushEnableIq() = default; - /// Default assignment operator QXmppPushEnableIq &QXmppPushEnableIq::operator=(const QXmppPushEnableIq &) = default; +/// Default move-assignment operator +QXmppPushEnableIq &QXmppPushEnableIq::operator=(QXmppPushEnableIq &&) = default; /// /// \brief Returns the jid of the app server diff --git a/src/base/QXmppPushEnableIq.h b/src/base/QXmppPushEnableIq.h index 49d48fbe..e76a2682 100644 --- a/src/base/QXmppPushEnableIq.h +++ b/src/base/QXmppPushEnableIq.h @@ -24,8 +24,10 @@ class QXMPP_EXPORT QXmppPushEnableIq : public QXmppIq public: QXmppPushEnableIq(); QXmppPushEnableIq(const QXmppPushEnableIq &); + QXmppPushEnableIq(QXmppPushEnableIq &&); ~QXmppPushEnableIq(); QXmppPushEnableIq &operator=(const QXmppPushEnableIq &); + QXmppPushEnableIq &operator=(QXmppPushEnableIq &&); /// /// \brief The Mode enum describes whether the IQ should enable or disable diff --git a/src/base/QXmppRegisterIq.cpp b/src/base/QXmppRegisterIq.cpp index 5103b22f..b5cdee77 100644 --- a/src/base/QXmppRegisterIq.cpp +++ b/src/base/QXmppRegisterIq.cpp @@ -43,11 +43,13 @@ QXmppRegisterIq::QXmppRegisterIq() /// Default copy-constructor QXmppRegisterIq::QXmppRegisterIq(const QXmppRegisterIq &other) = default; - +/// Default move-constructor +QXmppRegisterIq::QXmppRegisterIq(QXmppRegisterIq &&) = default; QXmppRegisterIq::~QXmppRegisterIq() = default; - /// Default assignment operator QXmppRegisterIq &QXmppRegisterIq::operator=(const QXmppRegisterIq &other) = default; +/// Default move-assignment operator +QXmppRegisterIq &QXmppRegisterIq::operator=(QXmppRegisterIq &&) = default; /// Constructs a regular change password request. /// diff --git a/src/base/QXmppRegisterIq.h b/src/base/QXmppRegisterIq.h index 063862cf..79937a0f 100644 --- a/src/base/QXmppRegisterIq.h +++ b/src/base/QXmppRegisterIq.h @@ -24,9 +24,11 @@ class QXMPP_EXPORT QXmppRegisterIq : public QXmppIq public: QXmppRegisterIq(); QXmppRegisterIq(const QXmppRegisterIq &other); + QXmppRegisterIq(QXmppRegisterIq &&); ~QXmppRegisterIq(); QXmppRegisterIq &operator=(const QXmppRegisterIq &other); + QXmppRegisterIq &operator=(QXmppRegisterIq &&); static QXmppRegisterIq createChangePasswordRequest(const QString &username, const QString &newPassword, const QString &to = {}); static QXmppRegisterIq createUnregistrationRequest(const QString &to = {}); diff --git a/src/base/QXmppRosterIq.cpp b/src/base/QXmppRosterIq.cpp index d886dff0..28f7572d 100644 --- a/src/base/QXmppRosterIq.cpp +++ b/src/base/QXmppRosterIq.cpp @@ -29,11 +29,13 @@ QXmppRosterIq::QXmppRosterIq() /// Default copy-constructor QXmppRosterIq::QXmppRosterIq(const QXmppRosterIq &) = default; - +/// Default move-constructor +QXmppRosterIq::QXmppRosterIq(QXmppRosterIq &&) = default; QXmppRosterIq::~QXmppRosterIq() = default; - /// Default assignment operator QXmppRosterIq &QXmppRosterIq::operator=(const QXmppRosterIq &) = default; +/// Default move-assignment operator +QXmppRosterIq &QXmppRosterIq::operator=(QXmppRosterIq &&) = default; /// /// Adds an item to the roster IQ. @@ -176,11 +178,13 @@ QXmppRosterIq::Item::Item() /// Default copy-constructor QXmppRosterIq::Item::Item(const QXmppRosterIq::Item &other) = default; - +/// Default move-constructor +QXmppRosterIq::Item::Item(QXmppRosterIq::Item &&) = default; QXmppRosterIq::Item::~Item() = default; - /// Default assignment operator QXmppRosterIq::Item &QXmppRosterIq::Item::operator=(const Item &other) = default; +/// Default assignment operator +QXmppRosterIq::Item &QXmppRosterIq::Item::operator=(Item &&) = default; /// /// Returns the bareJid of the roster entry. diff --git a/src/base/QXmppRosterIq.h b/src/base/QXmppRosterIq.h index 11bb04ca..dfd53b6e 100644 --- a/src/base/QXmppRosterIq.h +++ b/src/base/QXmppRosterIq.h @@ -44,9 +44,11 @@ public: Item(); Item(const Item &other); + Item(Item &&); ~Item(); Item &operator=(const Item &other); + Item &operator=(Item &&); QString bareJid() const; QSet<QString> groups() const; @@ -83,9 +85,11 @@ public: QXmppRosterIq(); QXmppRosterIq(const QXmppRosterIq &); + QXmppRosterIq(QXmppRosterIq &&); ~QXmppRosterIq() override; QXmppRosterIq &operator=(const QXmppRosterIq &); + QXmppRosterIq &operator=(QXmppRosterIq &&); QString version() const; void setVersion(const QString &); diff --git a/src/base/QXmppStanza.cpp b/src/base/QXmppStanza.cpp index d225b829..e4192128 100644 --- a/src/base/QXmppStanza.cpp +++ b/src/base/QXmppStanza.cpp @@ -186,11 +186,13 @@ QXmppExtendedAddress::QXmppExtendedAddress() /// Default copy-constructur QXmppExtendedAddress::QXmppExtendedAddress(const QXmppExtendedAddress &other) = default; - +/// Default move-constructur +QXmppExtendedAddress::QXmppExtendedAddress(QXmppExtendedAddress &&) = default; QXmppExtendedAddress::~QXmppExtendedAddress() = default; - /// Default assignment operator QXmppExtendedAddress &QXmppExtendedAddress::operator=(const QXmppExtendedAddress &other) = default; +/// Default assignment operator +QXmppExtendedAddress &QXmppExtendedAddress::operator=(QXmppExtendedAddress &&) = default; /// /// Returns the human-readable description of the address. @@ -321,6 +323,8 @@ QXmppStanza::Error::Error() /// Copy constructor QXmppStanza::Error::Error(const QXmppStanza::Error &) = default; +/// Move constructor +QXmppStanza::Error::Error(QXmppStanza::Error &&) = default; /// /// Initializes an error with a type, condition and text. @@ -347,9 +351,10 @@ QXmppStanza::Error::Error(const QString &type, const QString &cond, /// Default destructor QXmppStanza::Error::~Error() = default; - /// Copy operator QXmppStanza::Error &QXmppStanza::Error::operator=(const QXmppStanza::Error &) = default; +/// Move operator +QXmppStanza::Error &QXmppStanza::Error::operator=(QXmppStanza::Error &&) = default; /// /// Returns the human-readable description of the error. @@ -725,21 +730,15 @@ QXmppE2eeMetadata::QXmppE2eeMetadata(QSharedDataPointer<QXmppE2eeMetadataPrivate } /// \endcond -/// -/// Constructs a copy of \a other. -/// -/// \param other -/// +/// Copy-constructor. QXmppE2eeMetadata::QXmppE2eeMetadata(const QXmppE2eeMetadata &other) = default; - +/// Move-constructor. +QXmppE2eeMetadata::QXmppE2eeMetadata(QXmppE2eeMetadata &&) = default; QXmppE2eeMetadata::~QXmppE2eeMetadata() = default; - -/// -/// Assigns \a other to this end-to-end encryption metadata class. -/// -/// \param other -/// +/// Assignment operator. QXmppE2eeMetadata &QXmppE2eeMetadata::operator=(const QXmppE2eeMetadata &other) = default; +/// Assignment move-operator. +QXmppE2eeMetadata &QXmppE2eeMetadata::operator=(QXmppE2eeMetadata &&) = default; /// /// Returns the used encryption protocol. @@ -865,12 +864,14 @@ QXmppStanza::QXmppStanza(const QString &from, const QString &to) /// Constructs a copy of \a other. QXmppStanza::QXmppStanza(const QXmppStanza &other) = default; - +/// Move constructor. +QXmppStanza::QXmppStanza(QXmppStanza &&) = default; /// Destroys a QXmppStanza. QXmppStanza::~QXmppStanza() = default; - /// Assigns \a other to this stanza. QXmppStanza &QXmppStanza::operator=(const QXmppStanza &other) = default; +/// Move-assignment operator. +QXmppStanza &QXmppStanza::operator=(QXmppStanza &&) = default; /// /// Returns the stanza's recipient JID. diff --git a/src/base/QXmppStanza.h b/src/base/QXmppStanza.h index 05cee32c..2b35d63c 100644 --- a/src/base/QXmppStanza.h +++ b/src/base/QXmppStanza.h @@ -39,9 +39,11 @@ class QXMPP_EXPORT QXmppExtendedAddress public: QXmppExtendedAddress(); QXmppExtendedAddress(const QXmppExtendedAddress &); + QXmppExtendedAddress(QXmppExtendedAddress &&); ~QXmppExtendedAddress(); QXmppExtendedAddress &operator=(const QXmppExtendedAddress &); + QXmppExtendedAddress &operator=(QXmppExtendedAddress &&); QString description() const; void setDescription(const QString &description); @@ -76,9 +78,11 @@ public: QXmppE2eeMetadata(QSharedDataPointer<QXmppE2eeMetadataPrivate> d); /// \endcond QXmppE2eeMetadata(const QXmppE2eeMetadata &other); + QXmppE2eeMetadata(QXmppE2eeMetadata &&); ~QXmppE2eeMetadata(); QXmppE2eeMetadata &operator=(const QXmppE2eeMetadata &other); + QXmppE2eeMetadata &operator=(QXmppE2eeMetadata &&); QXmpp::Encryption encryption() const; void setEncryption(QXmpp::Encryption encryption); @@ -165,11 +169,13 @@ public: Error(); Error(const Error &); + Error(Error &&); Error(Type type, Condition cond, const QString &text = QString()); Error(const QString &type, const QString &cond, const QString &text = QString()); ~Error(); Error &operator=(const Error &); + Error &operator=(Error &&); int code() const; void setCode(int code); @@ -214,9 +220,11 @@ public: QXmppStanza(const QString &from = QString(), const QString &to = QString()); QXmppStanza(const QXmppStanza &other); + QXmppStanza(QXmppStanza &&); virtual ~QXmppStanza(); QXmppStanza &operator=(const QXmppStanza &other); + QXmppStanza &operator=(QXmppStanza &&); QString to() const; void setTo(const QString &); diff --git a/src/base/QXmppStreamFeatures.cpp b/src/base/QXmppStreamFeatures.cpp index 0f9f8113..a6cc4443 100644 --- a/src/base/QXmppStreamFeatures.cpp +++ b/src/base/QXmppStreamFeatures.cpp @@ -46,11 +46,13 @@ QXmppStreamFeatures::QXmppStreamFeatures() /// Default copy-constructor QXmppStreamFeatures::QXmppStreamFeatures(const QXmppStreamFeatures &) = default; - +/// Default move-constructor +QXmppStreamFeatures::QXmppStreamFeatures(QXmppStreamFeatures &&) = default; QXmppStreamFeatures::~QXmppStreamFeatures() = default; - /// Default assignment operator QXmppStreamFeatures &QXmppStreamFeatures::operator=(const QXmppStreamFeatures &) = default; +/// Default move-assignment operator +QXmppStreamFeatures &QXmppStreamFeatures::operator=(QXmppStreamFeatures &&) = default; /// /// Returns the resource binding mode diff --git a/src/base/QXmppStreamFeatures.h b/src/base/QXmppStreamFeatures.h index bd832b1b..eeca333f 100644 --- a/src/base/QXmppStreamFeatures.h +++ b/src/base/QXmppStreamFeatures.h @@ -20,9 +20,11 @@ class QXMPP_EXPORT QXmppStreamFeatures : public QXmppNonza public: QXmppStreamFeatures(); QXmppStreamFeatures(const QXmppStreamFeatures &); + QXmppStreamFeatures(QXmppStreamFeatures &&); ~QXmppStreamFeatures(); QXmppStreamFeatures &operator=(const QXmppStreamFeatures &); + QXmppStreamFeatures &operator=(QXmppStreamFeatures &&); /// Mode of a feature enum Mode { diff --git a/src/base/QXmppTrustMessageElement.h b/src/base/QXmppTrustMessageElement.h index 3d8c89cd..8499b84d 100644 --- a/src/base/QXmppTrustMessageElement.h +++ b/src/base/QXmppTrustMessageElement.h @@ -19,9 +19,11 @@ class QXMPP_EXPORT QXmppTrustMessageElement public: QXmppTrustMessageElement(); QXmppTrustMessageElement(const QXmppTrustMessageElement &other); + QXmppTrustMessageElement(QXmppTrustMessageElement &&); ~QXmppTrustMessageElement(); QXmppTrustMessageElement &operator=(const QXmppTrustMessageElement &other); + QXmppTrustMessageElement &operator=(QXmppTrustMessageElement &&); QString usage() const; void setUsage(const QString &usage); diff --git a/src/base/QXmppTrustMessageKeyOwner.h b/src/base/QXmppTrustMessageKeyOwner.h index 0b5e2d31..8a39b563 100644 --- a/src/base/QXmppTrustMessageKeyOwner.h +++ b/src/base/QXmppTrustMessageKeyOwner.h @@ -18,9 +18,11 @@ class QXMPP_EXPORT QXmppTrustMessageKeyOwner public: QXmppTrustMessageKeyOwner(); QXmppTrustMessageKeyOwner(const QXmppTrustMessageKeyOwner &other); + QXmppTrustMessageKeyOwner(QXmppTrustMessageKeyOwner &&); ~QXmppTrustMessageKeyOwner(); QXmppTrustMessageKeyOwner &operator=(const QXmppTrustMessageKeyOwner &other); + QXmppTrustMessageKeyOwner &operator=(QXmppTrustMessageKeyOwner &&); QString jid() const; void setJid(const QString &jid); diff --git a/src/base/QXmppTrustMessages.cpp b/src/base/QXmppTrustMessages.cpp index 53ebf9e0..66831a18 100644 --- a/src/base/QXmppTrustMessages.cpp +++ b/src/base/QXmppTrustMessages.cpp @@ -34,21 +34,15 @@ QXmppTrustMessageElement::QXmppTrustMessageElement() { } -/// -/// Constructs a copy of \a other. -/// -/// \param other -/// +/// Copy-constructor. QXmppTrustMessageElement::QXmppTrustMessageElement(const QXmppTrustMessageElement &other) = default; - +/// Move-constructor. +QXmppTrustMessageElement::QXmppTrustMessageElement(QXmppTrustMessageElement &&) = default; QXmppTrustMessageElement::~QXmppTrustMessageElement() = default; - -/// -/// Assigns \a other to this trust message element. -/// -/// \param other -/// +/// Assignment operator. QXmppTrustMessageElement &QXmppTrustMessageElement::operator=(const QXmppTrustMessageElement &other) = default; +/// Move-assignment operator. +QXmppTrustMessageElement &QXmppTrustMessageElement::operator=(QXmppTrustMessageElement &&) = default; /// /// Returns the namespace of the trust management protocol. @@ -193,21 +187,15 @@ QXmppTrustMessageKeyOwner::QXmppTrustMessageKeyOwner() { } -/// -/// Constructs a copy of \a other. -/// -/// \param other -/// +/// Copy constructor. QXmppTrustMessageKeyOwner::QXmppTrustMessageKeyOwner(const QXmppTrustMessageKeyOwner &other) = default; - +/// Copy constructor. +QXmppTrustMessageKeyOwner::QXmppTrustMessageKeyOwner(QXmppTrustMessageKeyOwner &&) = default; QXmppTrustMessageKeyOwner::~QXmppTrustMessageKeyOwner() = default; - -/// -/// Assigns \a other to this trust message key owner. -/// -/// \param other -/// +/// Assignment operator. QXmppTrustMessageKeyOwner &QXmppTrustMessageKeyOwner::operator=(const QXmppTrustMessageKeyOwner &other) = default; +/// Assignment operator. +QXmppTrustMessageKeyOwner &QXmppTrustMessageKeyOwner::operator=(QXmppTrustMessageKeyOwner &&) = default; /// /// Returns the bare JID of the key owner. diff --git a/src/base/QXmppTuneItem.cpp b/src/base/QXmppTuneItem.cpp index 36e4fd9b..8bb935fc 100644 --- a/src/base/QXmppTuneItem.cpp +++ b/src/base/QXmppTuneItem.cpp @@ -51,11 +51,13 @@ QXmppTuneItem::QXmppTuneItem() /// Copy-constructor. QXmppTuneItem::QXmppTuneItem(const QXmppTuneItem &other) = default; - +/// Move-constructor. +QXmppTuneItem::QXmppTuneItem(QXmppTuneItem &&) = default; QXmppTuneItem::~QXmppTuneItem() = default; - /// Assignment operator. QXmppTuneItem &QXmppTuneItem::operator=(const QXmppTuneItem &other) = default; +/// Move-assignment operator. +QXmppTuneItem &QXmppTuneItem::operator=(QXmppTuneItem &&) = default; /// /// Returns the artist of the piece or song. diff --git a/src/base/QXmppTuneItem.h b/src/base/QXmppTuneItem.h index 1819775a..f70a9266 100644 --- a/src/base/QXmppTuneItem.h +++ b/src/base/QXmppTuneItem.h @@ -21,9 +21,11 @@ class QXMPP_EXPORT QXmppTuneItem : public QXmppPubSubItem public: QXmppTuneItem(); QXmppTuneItem(const QXmppTuneItem &other); + QXmppTuneItem(QXmppTuneItem &&); ~QXmppTuneItem(); QXmppTuneItem &operator=(const QXmppTuneItem &other); + QXmppTuneItem &operator=(QXmppTuneItem &&); QString artist() const; void setArtist(QString artist); diff --git a/src/base/QXmppVCardIq.cpp b/src/base/QXmppVCardIq.cpp index 423918ba..4abec8ba 100644 --- a/src/base/QXmppVCardIq.cpp +++ b/src/base/QXmppVCardIq.cpp @@ -42,30 +42,20 @@ public: }; /// Constructs an empty address. - QXmppVCardAddress::QXmppVCardAddress() : d(new QXmppVCardAddressPrivate) { } -/// Constructs a copy of \a other. - -QXmppVCardAddress::QXmppVCardAddress(const QXmppVCardAddress &other) - : d(other.d) -{ -} - -QXmppVCardAddress::~QXmppVCardAddress() -{ -} - -/// Assigns \a other to this address. - -QXmppVCardAddress &QXmppVCardAddress::operator=(const QXmppVCardAddress &other) -{ - d = other.d; - return *this; -} +/// Copy-constructor +QXmppVCardAddress::QXmppVCardAddress(const QXmppVCardAddress &other) = default; +/// Move-constructor +QXmppVCardAddress::QXmppVCardAddress(QXmppVCardAddress &&) = default; +QXmppVCardAddress::~QXmppVCardAddress() = default; +/// Assignment operator. +QXmppVCardAddress &QXmppVCardAddress::operator=(const QXmppVCardAddress &other) = default; +/// Move-assignment operator. +QXmppVCardAddress &QXmppVCardAddress::operator=(QXmppVCardAddress &&) = default; /// \brief Checks if two address objects represent the same address. diff --git a/src/base/QXmppVCardIq.h b/src/base/QXmppVCardIq.h index dc027a76..ea918c41 100644 --- a/src/base/QXmppVCardIq.h +++ b/src/base/QXmppVCardIq.h @@ -34,9 +34,11 @@ public: QXmppVCardAddress(); QXmppVCardAddress(const QXmppVCardAddress &other); + QXmppVCardAddress(QXmppVCardAddress &&); ~QXmppVCardAddress(); QXmppVCardAddress &operator=(const QXmppVCardAddress &other); + QXmppVCardAddress &operator=(QXmppVCardAddress &&); QString country() const; void setCountry(const QString &country); |
