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

Fix change rules

parent 532f2842
Pipeline #52963 passed with stage
in 42 minutes and 18 seconds
......@@ -31,7 +31,15 @@ DKIMManageRulesWidgetItem::~DKIMManageRulesWidgetItem()
MessageViewer::DKIMRule DKIMManageRulesWidgetItem::rule() const
{
return mRule;
MessageViewer::DKIMRule rule;
rule.setEnabled(checkState(ColumnType::Enabled) == Qt::Checked);
rule.setDomain(text(ColumnType::Domain));
rule.setFrom(text(ColumnType::From));
rule.setListId(text(ColumnType::ListId));
rule.setPriority(text(ColumnType::Priority).toInt());
rule.setRuleType(mRuleTypeCombobox->ruleType());
rule.setSignedDomainIdentifier(text(ColumnType::SDid).split(QLatin1Char(' ')));
return rule;
}
void DKIMManageRulesWidgetItem::setRule(const MessageViewer::DKIMRule &rule)
......
......@@ -102,12 +102,12 @@ void DKIMRule::setPriority(int priority)
QDebug operator<<(QDebug d, const DKIMRule &t)
{
d << "mDomain: " << t.domain();
d << "mSignedDomainIdentifier: " << t.signedDomainIdentifier();
d << "mFrom: " << t.from();
d << "mEnabled: " << t.enabled();
d << "mRuleType " << t.ruleType();
d << "mListId " << t.listId();
d << "mPriority " << t.priority();
d << " mDomain: " << t.domain();
d << " mSignedDomainIdentifier: " << t.signedDomainIdentifier();
d << " mFrom: " << t.from();
d << " mEnabled: " << t.enabled();
d << " mRuleType " << t.ruleType();
d << " mListId " << t.listId();
d << " mPriority " << t.priority();
return d;
}
......@@ -42,7 +42,7 @@ DKIMRuleDialog::DKIMRuleDialog(QWidget *parent)
mOkButton->setEnabled(enabled);
});
connect(buttonBox, &QDialogButtonBox::accepted, this, &DKIMRuleDialog::slotAccepted);
connect(buttonBox, &QDialogButtonBox::accepted, this, &DKIMRuleDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &DKIMRuleDialog::reject);
readConfig();
}
......@@ -52,11 +52,6 @@ DKIMRuleDialog::~DKIMRuleDialog()
writeConfig();
}
void DKIMRuleDialog::slotAccepted()
{
accept();
}
void DKIMRuleDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myDKIMRuleDialogConfigGroupName);
......
......@@ -25,7 +25,6 @@ public:
void loadRule(const MessageViewer::DKIMRule &rule);
private:
void slotAccepted();
void writeConfig();
void readConfig();
DKIMRuleWidget *const mRuleWidget;
......
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