diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2015-08-31 17:29:51 +0200 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2015-08-31 17:29:51 +0200 |
| commit | c1b3a7421db8d5e3a0bed5fd761e918f99b90459 (patch) | |
| tree | 59be311a34f48e37e6cebb5e4031a96bdacee82a /src/base | |
| parent | a441067fe579080f427351929b64861709a5e9ee (diff) | |
| download | qxmpp-c1b3a7421db8d5e3a0bed5fd761e918f99b90459.tar.gz | |
add assignment operators for QXmppJingleIq and QXmppJingleIq::Content
Diffstat (limited to 'src/base')
| -rw-r--r-- | src/base/QXmppJingleIq.cpp | 26 | ||||
| -rw-r--r-- | src/base/QXmppJingleIq.h | 4 |
2 files changed, 30 insertions, 0 deletions
diff --git a/src/base/QXmppJingleIq.cpp b/src/base/QXmppJingleIq.cpp index fa958490..d24b8f73 100644 --- a/src/base/QXmppJingleIq.cpp +++ b/src/base/QXmppJingleIq.cpp @@ -175,16 +175,32 @@ 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; +} + QXmppJingleIq::Content::~Content() { } @@ -695,6 +711,16 @@ QXmppJingleIq::~QXmppJingleIq() { } +/// 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 diff --git a/src/base/QXmppJingleIq.h b/src/base/QXmppJingleIq.h index 7e21b054..3dcdcd6d 100644 --- a/src/base/QXmppJingleIq.h +++ b/src/base/QXmppJingleIq.h @@ -191,6 +191,8 @@ public: Content(const QXmppJingleIq::Content &other); ~Content(); + Content& operator=(const Content &other); + QString creator() const; void setCreator(const QString &creator); @@ -294,6 +296,8 @@ public: QXmppJingleIq(const QXmppJingleIq &other); ~QXmppJingleIq(); + QXmppJingleIq& operator=(const QXmppJingleIq &other); + Action action() const; void setAction(Action action); |
