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

Add support for rules

parent ebe4fcc7
Pipeline #67977 passed with stage
in 53 minutes and 20 seconds
......@@ -17,5 +17,6 @@ ConfirmBeforeDeletingRuleTest::ConfirmBeforeDeletingRuleTest(QObject *parent)
void ConfirmBeforeDeletingRuleTest::shouldHaveDefaultValues()
{
ConfirmBeforeDeletingRule r;
QVERIFY(r.pattern().isEmpty());
// TODO
}
......@@ -20,3 +20,13 @@ ConfirmBeforeDeletingManager *ConfirmBeforeDeletingManager::self()
static ConfirmBeforeDeletingManager s_self;
return &s_self;
}
void ConfirmBeforeDeletingManager::loadRules()
{
// TODO
}
void ConfirmBeforeDeletingManager::saveRules()
{
// TODO
}
......@@ -20,6 +20,9 @@ public:
static ConfirmBeforeDeletingManager *self();
void loadRules();
void saveRules();
private:
QVector<ConfirmBeforeDeletingRule> mRules;
};
......@@ -23,3 +23,9 @@ void ConfirmBeforeDeletingRule::setPattern(const QString &newPattern)
{
mPattern = newPattern;
}
QDebug operator<<(QDebug d, const ConfirmBeforeDeletingRule &t)
{
d << "Pattern " << t.pattern();
return d;
}
......@@ -6,6 +6,7 @@
#pragma once
#include "kmailconfirmbeforedeleting_export.h"
#include <QDebug>
#include <QString>
class KMAILCONFIRMBEFOREDELETING_EXPORT ConfirmBeforeDeletingRule
{
......@@ -16,6 +17,9 @@ public:
Q_REQUIRED_RESULT const QString &pattern() const;
void setPattern(const QString &newPattern);
// TODO save/Load
private:
QString mPattern;
};
Q_DECLARE_TYPEINFO(ConfirmBeforeDeletingRule, Q_MOVABLE_TYPE);
KMAILCONFIRMBEFOREDELETING_EXPORT QDebug operator<<(QDebug d, const ConfirmBeforeDeletingRule &t);
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