aboutsummaryrefslogtreecommitdiff
path: root/src/base/QXmppVCardIq.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/QXmppVCardIq.cpp')
-rw-r--r--src/base/QXmppVCardIq.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/base/QXmppVCardIq.cpp b/src/base/QXmppVCardIq.cpp
index 6d9f1fdb..7701b60a 100644
--- a/src/base/QXmppVCardIq.cpp
+++ b/src/base/QXmppVCardIq.cpp
@@ -86,6 +86,23 @@ QXmppVCardAddress& QXmppVCardAddress::operator=(const QXmppVCardAddress &other)
return *this;
}
+/// \brief Checks if two address objects represent the same address.
+
+bool operator==(const QXmppVCardAddress &left, const QXmppVCardAddress &right)
+{
+ return left.type() == right.type() &&
+ left.country() == right.country() &&
+ left.locality() == right.locality() &&
+ left.postcode() == right.postcode() &&
+ left.region() == right.region() &&
+ left.street() == right.street();
+}
+
+bool operator!=(const QXmppVCardAddress &left, const QXmppVCardAddress &right)
+{
+ return !(left == right);
+}
+
/// Returns the country.
QString QXmppVCardAddress::country() const