Commit ded9f724 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add priorité

parent 0fdc127a
......@@ -35,4 +35,5 @@ void DKIMRuleTest::shouldHaveDefaultValues()
QVERIFY(rule.listId().isEmpty());
QVERIFY(rule.enabled());
QCOMPARE(rule.ruleType(), MessageViewer::DKIMRule::RuleType::Unknown);
QCOMPARE(rule.priority(), 1000);
}
......@@ -96,12 +96,23 @@ bool DKIMRule::operator==(const DKIMRule &other) const
&& other.from() == mFrom
&& other.listId() == mListId
&& other.ruleType() == mRuleType
&& other.enabled() == mEnabled) {
&& other.enabled() == mEnabled
&& other.priority() == mPriority) {
return true;
}
return false;
}
int DKIMRule::priority() const
{
return mPriority;
}
void DKIMRule::setPriority(int priority)
{
mPriority = priority;
}
QDebug operator <<(QDebug d, const DKIMRule &t)
{
d << "mDomain: " << t.domain();
......@@ -110,5 +121,6 @@ QDebug operator <<(QDebug d, const DKIMRule &t)
d << "mEnabled: " << t.enabled();
d << "mRuleType " << t.ruleType();
d << "mListId " << t.listId();
d << "mPriority " << t.priority();
return d;
}
......@@ -63,12 +63,16 @@ public:
Q_REQUIRED_RESULT bool operator==(const DKIMRule &other) const;
Q_REQUIRED_RESULT int priority() const;
void setPriority(int priority);
private:
QStringList mSignedDomainIdentifier;
QString mDomain;
QString mFrom;
QString mListId;
RuleType mRuleType = DKIMRule::RuleType::Unknown;
int mPriority = 1000;
bool mEnabled = true;
};
}
......
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