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

Add autotest

parent 1bb7a805
......@@ -69,4 +69,9 @@ void DKIMPolicyWidgetTest::shouldHaveDefaultValues()
QVERIFY(mReadAuthResultHeader);
QVERIFY(!mReadAuthResultHeader->text().isEmpty());
QVERIFY(!mReadAuthResultHeader->isEnabled());
QCheckBox *mAutoGenerateOnlyIfSenderInSDID = w.findChild<QCheckBox *>(QStringLiteral("mAutoGenerateOnlyIfSenderInSDID"));
QVERIFY(mAutoGenerateOnlyIfSenderInSDID);
QVERIFY(!mAutoGenerateOnlyIfSenderInSDID->text().isEmpty());
QVERIFY(!mAutoGenerateOnlyIfSenderInSDID->isEnabled());
}
......@@ -43,6 +43,7 @@ DKIMPolicyWidget::DKIMPolicyWidget(QWidget *parent)
mUseDMARC->setEnabled(state);
mUseDefaultRules->setEnabled(state);
mRulesButton->setEnabled(state);
mAutoGenerateOnlyIfSenderInSDID->setEnabled(state);
mAutoGenerateRule->setEnabled(state);
mReadAuthResultHeader->setEnabled(state);
});
......@@ -67,7 +68,8 @@ DKIMPolicyWidget::DKIMPolicyWidget(QWidget *parent)
mAutoGenerateRule->setEnabled(false);
mainLayout->addWidget(mAutoGenerateRule);
mAutoGenerateOnlyIfSenderInSDID = new QCheckBox(i18n("Autogenerate when Sender in SDID"), this);
//TODO Add spacer
mAutoGenerateOnlyIfSenderInSDID = new QCheckBox(QStringLiteral(" ") + i18n("Autogenerate when Sender in SDID"), this);
mAutoGenerateOnlyIfSenderInSDID->setObjectName(QStringLiteral("mAutoGenerateOnlyIfSenderInSDID"));
mAutoGenerateOnlyIfSenderInSDID->setEnabled(false);
mainLayout->addWidget(mAutoGenerateOnlyIfSenderInSDID);
......
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