Commit 4a79f5a9 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add more feature

parent 848e4378
......@@ -48,4 +48,10 @@ void DKIMGeneralWidgetTest::shouldHaveDefaultValues()
QComboBox *mSaveKey = w.findChild<QComboBox *>(QStringLiteral("mSaveKey"));
QVERIFY(mSaveKey);
QCheckBox *mUseOnlyAuthenticationResult = w.findChild<QCheckBox *>(QStringLiteral("mUseOnlyAuthenticationResult"));
QVERIFY(mUseOnlyAuthenticationResult);
QVERIFY(!mUseOnlyAuthenticationResult->text().isEmpty());
QVERIFY(!mUseOnlyAuthenticationResult->isChecked());
}
......@@ -57,6 +57,11 @@ DKIMGeneralWidget::DKIMGeneralWidget(QWidget *parent)
saveKeyLayout->addWidget(mSaveKey);
saveKeyLayout->addStretch(1);
mUseOnlyAuthenticationResult = new QCheckBox(i18n("Replace DKIM result by Authentication-Result header value"));
mUseOnlyAuthenticationResult->setObjectName(QStringLiteral("mUseOnlyAuthenticationResult"));
mUseOnlyAuthenticationResult->setChecked(false);
mainLayout->addWidget(mUseOnlyAuthenticationResult);
mainLayout->addStretch(1);
}
......@@ -69,6 +74,7 @@ void DKIMGeneralWidget::loadSettings()
loadWidget(mEnableDkimSupport, MessageViewer::MessageViewerSettings::self()->enabledDkimItem());
loadWidget(mSaveResult, MessageViewer::MessageViewerSettings::self()->saveDkimResultItem());
loadWidget(mSaveKey, MessageViewer::MessageViewerSettings::self()->saveKeyItem());
loadWidget(mUseOnlyAuthenticationResult, MessageViewer::MessageViewerSettings::self()->useOnlyAuthenticationResultsItem());
}
void DKIMGeneralWidget::saveSettings()
......@@ -79,6 +85,7 @@ void DKIMGeneralWidget::saveSettings()
if (!mEnableDkimSupport->isChecked()) {
MessageViewer::DKIMManager::self()->clearInfoWidget();
}
loadWidget(mUseOnlyAuthenticationResult, MessageViewer::MessageViewerSettings::self()->useOnlyAuthenticationResultsItem());
}
void DKIMGeneralWidget::resetSettings()
......
......@@ -37,6 +37,7 @@ private:
QCheckBox *mEnableDkimSupport = nullptr;
QCheckBox *mSaveResult = nullptr;
QComboBox *mSaveKey = nullptr;
QCheckBox *mUseOnlyAuthenticationResult = nullptr;
};
#endif // DKIMGENERALWIDGET_H
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