aboutsummaryrefslogtreecommitdiff
path: root/src/base/QXmppDataForm.h
diff options
context:
space:
mode:
authorLinus Jahn <lnj@kaidan.im>2022-06-17 18:26:01 +0200
committerLinus Jahn <lnj@kaidan.im>2022-06-18 12:45:19 +0200
commit31ef165cbbf918ba0ddd00f86c6dee257a0b936b (patch)
treee891a37cf70fbc60354d9a9cd69d4e9cb7d34a80 /src/base/QXmppDataForm.h
parent675f57b1d7facab15eff303f022c332a8220777e (diff)
downloadqxmpp-31ef165cbbf918ba0ddd00f86c6dee257a0b936b.tar.gz
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/QXmppDataForm.h')
-rw-r--r--src/base/QXmppDataForm.h6
1 files changed, 6 insertions, 0 deletions
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);