Commit 848e4378 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add more option

parent 8ca64ee6
...@@ -77,7 +77,7 @@ set(LIBKLEO_LIB_VERSION "5.13.40") ...@@ -77,7 +77,7 @@ set(LIBKLEO_LIB_VERSION "5.13.40")
set(AKONADI_LIB_VERSION "5.13.40") set(AKONADI_LIB_VERSION "5.13.40")
set(INCIDENCEEDITOR_LIB_VERSION "5.13.40") set(INCIDENCEEDITOR_LIB_VERSION "5.13.40")
set(KTNEF_LIB_VERSION "5.13.40") set(KTNEF_LIB_VERSION "5.13.40")
set(MESSAGELIB_LIB_VERSION "5.13.41") set(MESSAGELIB_LIB_VERSION "5.13.42")
set(AKONADICALENDAR_LIB_VERSION "5.13.40") set(AKONADICALENDAR_LIB_VERSION "5.13.40")
set(CALENDAR_UTILS_VERSION "5.13.40") set(CALENDAR_UTILS_VERSION "5.13.40")
set(KPIMTEXTEDIT_LIB_VERSION "5.13.40") set(KPIMTEXTEDIT_LIB_VERSION "5.13.40")
......
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
#include "dkimadvancedwidget.h" #include "dkimadvancedwidget.h"
#include <QTest> #include <QTest>
#include <QFormLayout> #include <QFormLayout>
#include <QCheckBox>
#include <QComboBox>
QTEST_MAIN(DKIMAdvancedWidgetTest) QTEST_MAIN(DKIMAdvancedWidgetTest)
DKIMAdvancedWidgetTest::DKIMAdvancedWidgetTest(QObject *parent) DKIMAdvancedWidgetTest::DKIMAdvancedWidgetTest(QObject *parent)
...@@ -34,4 +36,17 @@ void DKIMAdvancedWidgetTest::shouldHaveDefaultValues() ...@@ -34,4 +36,17 @@ void DKIMAdvancedWidgetTest::shouldHaveDefaultValues()
QFormLayout *mainLayout = w.findChild<QFormLayout *>(QStringLiteral("mainLayout")); QFormLayout *mainLayout = w.findChild<QFormLayout *>(QStringLiteral("mainLayout"));
QVERIFY(mainLayout); QVERIFY(mainLayout);
QCOMPARE(mainLayout->contentsMargins(), QMargins(0, 0, 0, 0)); QCOMPARE(mainLayout->contentsMargins(), QMargins(0, 0, 0, 0));
QCheckBox *mCheckDKIMWhenOnlyTesting = w.findChild<QCheckBox *>(QStringLiteral("mCheckDKIMWhenOnlyTesting"));
QVERIFY(mCheckDKIMWhenOnlyTesting);
QVERIFY(!mCheckDKIMWhenOnlyTesting->text().isEmpty());
QCheckBox *mUseAuthenticationResultRelaxedParser = w.findChild<QCheckBox *>(QStringLiteral("mUseAuthenticationResultRelaxedParser"));
QVERIFY(mUseAuthenticationResultRelaxedParser);
QVERIFY(!mUseAuthenticationResultRelaxedParser->text().isEmpty());
QComboBox *mSha1Policy = w.findChild<QComboBox *>(QStringLiteral("rsa1-policy"));
QVERIFY(mSha1Policy);
QVERIFY(mSha1Policy->count() > 0);
} }
...@@ -38,6 +38,10 @@ DKIMAdvancedWidget::DKIMAdvancedWidget(QWidget *parent) ...@@ -38,6 +38,10 @@ DKIMAdvancedWidget::DKIMAdvancedWidget(QWidget *parent)
mCheckDKIMWhenOnlyTesting->setObjectName(QStringLiteral("mCheckDKIMWhenOnlyTesting")); mCheckDKIMWhenOnlyTesting->setObjectName(QStringLiteral("mCheckDKIMWhenOnlyTesting"));
mainLayout->addRow(mCheckDKIMWhenOnlyTesting); mainLayout->addRow(mCheckDKIMWhenOnlyTesting);
mUseAuthenticationResultRelaxedParser = new QCheckBox(i18n("Use relaxed parsing when reading \"Authentication-Result\" header"), this);
mUseAuthenticationResultRelaxedParser->setObjectName(QStringLiteral("mUseAuthenticationResultRelaxedParser"));
mainLayout->addRow(mUseAuthenticationResultRelaxedParser);
mSha1Policy = new QComboBox(this); mSha1Policy = new QComboBox(this);
mSha1Policy->setObjectName(QStringLiteral("rsa1-policy")); mSha1Policy->setObjectName(QStringLiteral("rsa1-policy"));
mSha1Policy->addItems({i18n("Nothing"), i18n("Warning"), i18n("Error")}); mSha1Policy->addItems({i18n("Nothing"), i18n("Warning"), i18n("Error")});
...@@ -53,12 +57,14 @@ void DKIMAdvancedWidget::loadSettings() ...@@ -53,12 +57,14 @@ void DKIMAdvancedWidget::loadSettings()
{ {
loadWidget(mSha1Policy, MessageViewer::MessageViewerSettings::self()->policyRsaSha1Item()); loadWidget(mSha1Policy, MessageViewer::MessageViewerSettings::self()->policyRsaSha1Item());
loadWidget(mCheckDKIMWhenOnlyTesting, MessageViewer::MessageViewerSettings::self()->verifySignatureWhenOnlyTestItem()); loadWidget(mCheckDKIMWhenOnlyTesting, MessageViewer::MessageViewerSettings::self()->verifySignatureWhenOnlyTestItem());
loadWidget(mUseAuthenticationResultRelaxedParser, MessageViewer::MessageViewerSettings::self()->useRelaxedParsingAuthenticationResultsItem());
} }
void DKIMAdvancedWidget::saveSettings() void DKIMAdvancedWidget::saveSettings()
{ {
saveComboBox(mSha1Policy, MessageViewer::MessageViewerSettings::self()->policyRsaSha1Item()); saveComboBox(mSha1Policy, MessageViewer::MessageViewerSettings::self()->policyRsaSha1Item());
saveCheckBox(mCheckDKIMWhenOnlyTesting, MessageViewer::MessageViewerSettings::self()->verifySignatureWhenOnlyTestItem()); saveCheckBox(mCheckDKIMWhenOnlyTesting, MessageViewer::MessageViewerSettings::self()->verifySignatureWhenOnlyTestItem());
saveCheckBox(mUseAuthenticationResultRelaxedParser, MessageViewer::MessageViewerSettings::self()->useRelaxedParsingAuthenticationResultsItem());
} }
void DKIMAdvancedWidget::resetSettings() void DKIMAdvancedWidget::resetSettings()
......
...@@ -36,6 +36,7 @@ public: ...@@ -36,6 +36,7 @@ public:
private: private:
QComboBox *mSha1Policy = nullptr; QComboBox *mSha1Policy = nullptr;
QCheckBox *mCheckDKIMWhenOnlyTesting = nullptr; QCheckBox *mCheckDKIMWhenOnlyTesting = nullptr;
QCheckBox *mUseAuthenticationResultRelaxedParser = nullptr;
}; };
#endif // DKIMADVANCEDWIDGET_H #endif // DKIMADVANCEDWIDGET_H
...@@ -56,7 +56,7 @@ DKIMPolicyWidget::DKIMPolicyWidget(QWidget *parent) ...@@ -56,7 +56,7 @@ DKIMPolicyWidget::DKIMPolicyWidget(QWidget *parent)
mReadAuthResultHeader = new QCheckBox(i18n("Read Authentication-Results header"), this); mReadAuthResultHeader = new QCheckBox(i18n("Read Authentication-Results header"), this);
mReadAuthResultHeader->setObjectName(QStringLiteral("mReadAuthResultHeader")); mReadAuthResultHeader->setObjectName(QStringLiteral("mReadAuthResultHeader"));
mReadAuthResultHeader->setEnabled(false); mReadAuthResultHeader->setEnabled(false);
mReadAuthResultHeader->setVisible(false); //Reenable when code will be clean! //mReadAuthResultHeader->setVisible(false); //Reenable when code will be clean!
mainLayout->addWidget(mReadAuthResultHeader); mainLayout->addWidget(mReadAuthResultHeader);
mUseDefaultRules = new QCheckBox(i18n("Use default rule"), this); mUseDefaultRules = new QCheckBox(i18n("Use default rule"), this);
......
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