diff options
| author | 0xd34df00d <0xd34df00d@gmail.com> | 2014-04-23 17:29:21 +0400 |
|---|---|---|
| committer | 0xd34df00d <0xd34df00d@gmail.com> | 2014-04-23 17:29:21 +0400 |
| commit | 1db9e5ebf34895c610d97f9f61718781f7b69923 (patch) | |
| tree | e2a248a3c2ee4d4c00a3593ebad329ad28529b20 /src/base/QXmppVCardIq.cpp | |
| parent | 721d34cf7955274d788a50ac1976b5f2577ef050 (diff) | |
| download | qxmpp-1db9e5ebf34895c610d97f9f61718781f7b69923.tar.gz | |
Added equality ops for QXmppVCardIq.
Diffstat (limited to 'src/base/QXmppVCardIq.cpp')
| -rw-r--r-- | src/base/QXmppVCardIq.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/base/QXmppVCardIq.cpp b/src/base/QXmppVCardIq.cpp index 8733256b..4a237200 100644 --- a/src/base/QXmppVCardIq.cpp +++ b/src/base/QXmppVCardIq.cpp @@ -678,6 +678,34 @@ QXmppVCardIq& QXmppVCardIq::operator=(const QXmppVCardIq &other) return *this; } +/// \brief Checks if two VCard objects represent the same VCard. + +bool operator==(const QXmppVCardIq &left, const QXmppVCardIq &right) +{ + return left.birthday() == right.birthday() && + left.description() == right.description() && + left.email() == right.email() && + left.firstName() == right.firstName() && + left.fullName() == right.fullName() && + left.lastName() == right.lastName() && + left.middleName() == right.middleName() && + left.nickName() == right.nickName() && + left.photo() == right.photo() && + left.photoType() == right.photoType() && + left.url() == right.url() && + left.addresses() == right.addresses() && + left.emails() == right.emails() && + left.phones() == right.phones() && + left.organization() == right.organization(); +} + +/// \brief Checks if two VCard objects represent different VCards. + +bool operator!=(const QXmppVCardIq &left, const QXmppVCardIq &right) +{ + return !(left == right); +} + /// Returns the date of birth of the individual associated with the vCard. /// |
