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

Const'ify pointer

parent fdd30621
......@@ -15,44 +15,44 @@
using namespace MessageViewer;
DKIMRuleWidget::DKIMRuleWidget(QWidget *parent)
: QWidget(parent)
, mEnabled(new QCheckBox(i18n("Enabled"), this))
, mDomain(new QLineEdit(this))
, mSignatureDomainIdentifier(new QLineEdit(this))
, mFrom(new QLineEdit(this))
, mListId(new QLineEdit(this))
, mPriority(new QSpinBox(this))
, mRuleType(new DKIMManageRulesComboBox(this))
{
auto layout = new QFormLayout(this);
layout->setObjectName(QStringLiteral("layout"));
layout->setContentsMargins({});
mEnabled = new QCheckBox(i18n("Enabled"), this);
mEnabled->setObjectName(QStringLiteral("enabled"));
mEnabled->setChecked(true);
layout->addWidget(mEnabled);
mDomain = new QLineEdit(this);
mDomain->setObjectName(QStringLiteral("domain"));
mDomain->setClearButtonEnabled(true);
layout->addRow(i18n("Domain:"), mDomain);
connect(mDomain, &QLineEdit::textChanged, this, &DKIMRuleWidget::updateOkButton);
mListId = new QLineEdit(this);
mListId->setObjectName(QStringLiteral("listid"));
mListId->setClearButtonEnabled(true);
layout->addRow(i18n("List-Id:"), mListId);
mFrom = new QLineEdit(this);
mFrom->setObjectName(QStringLiteral("from"));
mFrom->setClearButtonEnabled(true);
layout->addRow(i18n("From:"), mFrom);
mFrom->setPlaceholderText(i18n("Use '*' to specify all emails from domain"));
connect(mFrom, &QLineEdit::textChanged, this, &DKIMRuleWidget::updateOkButton);
mSignatureDomainIdentifier = new QLineEdit(this);
mSignatureDomainIdentifier->setObjectName(QStringLiteral("signaturedomainidentifier"));
mSignatureDomainIdentifier->setClearButtonEnabled(true);
layout->addRow(i18n("SDID:"), mSignatureDomainIdentifier);
mRuleType = new DKIMManageRulesComboBox(this);
mRuleType->setObjectName(QStringLiteral("ruletype"));
layout->addRow(i18n("Rule:"), mRuleType);
mPriority = new QSpinBox(this);
mPriority->setObjectName(QStringLiteral("priority"));
mPriority->setMinimum(1);
mPriority->setMaximum(9999);
......
......@@ -29,13 +29,13 @@ Q_SIGNALS:
private:
void updateOkButton();
QCheckBox *mEnabled = nullptr;
QLineEdit *mDomain = nullptr;
QLineEdit *mSignatureDomainIdentifier = nullptr;
QLineEdit *mFrom = nullptr;
QLineEdit *mListId = nullptr;
QSpinBox *mPriority = nullptr;
DKIMManageRulesComboBox *mRuleType = nullptr;
QCheckBox *const mEnabled;
QLineEdit *const mDomain;
QLineEdit *const mSignatureDomainIdentifier;
QLineEdit *const mFrom;
QLineEdit *const mListId;
QSpinBox *const mPriority;
DKIMManageRulesComboBox *const mRuleType;
};
}
#endif // DKIMRULEWIDGET_H
......@@ -11,6 +11,7 @@
using namespace MessageViewer;
DKIMViewerMenu::DKIMViewerMenu(QObject *parent)
: QObject(parent)
, mMenu(new QMenu(i18n("DKIM")))
{
initialize();
}
......@@ -32,7 +33,6 @@ void DKIMViewerMenu::setEnableUpdateDkimKeyMenu(bool enabled)
void DKIMViewerMenu::initialize()
{
mMenu = new QMenu(i18n("DKIM"));
QAction *checkSignature = mMenu->addAction(i18n("Recheck DKIM Signature"));
connect(checkSignature, &QAction::triggered, this, &DKIMViewerMenu::recheckSignature);
......
......@@ -29,7 +29,7 @@ Q_SIGNALS:
private:
void initialize();
QMenu *mMenu = nullptr;
QMenu *const mMenu;
QAction *mUpdateDKIMKey = nullptr;
};
}
......
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