Commit a8370a9d authored by Laurent Montel's avatar Laurent Montel 😁

Add == operator

parent 252baad0
...@@ -63,6 +63,14 @@ VCardLine &VCardLine::operator=(const VCardLine &line) ...@@ -63,6 +63,14 @@ VCardLine &VCardLine::operator=(const VCardLine &line)
return *this; return *this;
} }
bool VCardLine::operator==(const VCardLine &other) const
{
return (mParamMap == other.parameterMap()) &&
(mValue == other.value()) &&
(mIdentifier == other.identifier()) &&
(mGroup == other.group());
}
void VCardLine::setIdentifier(const QString &identifier) void VCardLine::setIdentifier(const QString &identifier)
{ {
mIdentifier = identifier; mIdentifier = identifier;
......
...@@ -46,6 +46,13 @@ public: ...@@ -46,6 +46,13 @@ public:
VCardLine &operator=(const VCardLine &line); VCardLine &operator=(const VCardLine &line);
/**
* Equality operator.
*
*/
bool operator==(const VCardLine &other) const;
/** /**
* Sets the identifier of this line e.g. UID, FN, CLASS * Sets the identifier of this line e.g. UID, FN, CLASS
* *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment