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

Add more feature

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