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

Add operator==

parent 34dd137e
......@@ -124,6 +124,16 @@ time_t MailSummary::date() const
return mDate;
}
bool MailSummary::operator ==(const MailSummary &other) const
{
return (mSerialNumber == other.mSerialNumber)
&& (mMessageId == other.mMessageId)
&& (mSubject == other.mSubject)
&& (mFrom == other.mFrom)
&& (mTo == other.mTo)
&& (mDate == other.mDate);
}
void MailSummary::set(quint32 serialNumber, const QString &messageId, const QString &subject, const QString &from, const QString &to, time_t date)
{
mSerialNumber = serialNumber;
......
......@@ -86,6 +86,7 @@ public:
/** Date the message was sent */
time_t date() const;
bool operator ==(const MailSummary &other) const;
private:
quint32 mSerialNumber;
QString mMessageId, mSubject, mFrom, mTo;
......
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