Commit 0046f988 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Const'ify pointer

parent 5795e45f
Pipeline #60277 passed with stage
in 54 minutes and 1 second
......@@ -16,16 +16,16 @@ static const char myConfigGroupName[] = "Markdown";
}
MarkdownConfigureWidget::MarkdownConfigureWidget(QWidget *parent)
: MessageComposer::PluginEditorConvertTextConfigureWidget(parent)
, mLatexSupport(new QCheckBox(i18n("Enable embedded LaTeX"), this))
, mExtraDefinitionLists(new QCheckBox(i18n("Enable PHP Markdown Extra definition lists"), this))
{
auto mainLayout = new QVBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainlayout"));
mainLayout->setContentsMargins({});
mLatexSupport = new QCheckBox(i18n("Enable embedded LaTeX"), this);
mLatexSupport->setObjectName(QStringLiteral("latex"));
mainLayout->addWidget(mLatexSupport);
mExtraDefinitionLists = new QCheckBox(i18n("Enable PHP Markdown Extra definition lists"), this);
mExtraDefinitionLists->setObjectName(QStringLiteral("extradefinitionlists"));
mainLayout->addWidget(mExtraDefinitionLists);
mainLayout->addStretch(1);
......
......@@ -21,7 +21,7 @@ public:
void resetSettings() override;
private:
QCheckBox *mLatexSupport = nullptr;
QCheckBox *mExtraDefinitionLists = nullptr;
QCheckBox *const mLatexSupport;
QCheckBox *const mExtraDefinitionLists;
};
......@@ -15,12 +15,12 @@
MarkdownCreateImageDialog::MarkdownCreateImageDialog(QWidget *parent)
: QDialog(parent)
, mMarkdownCreateImageWidget(new MarkdownCreateImageWidget(this))
{
setWindowTitle(i18nc("@title:window", "Add Image"));
auto mainLayout = new QVBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainlayout"));
mMarkdownCreateImageWidget = new MarkdownCreateImageWidget(this);
mMarkdownCreateImageWidget->setObjectName(QStringLiteral("markdowncreateimagewidget"));
mainLayout->addWidget(mMarkdownCreateImageWidget);
......
......@@ -22,7 +22,7 @@ private:
void writeConfig();
void readConfig();
void slotEnabledOkButton(bool enabled);
MarkdownCreateImageWidget *mMarkdownCreateImageWidget = nullptr;
MarkdownCreateImageWidget *const mMarkdownCreateImageWidget;
QPushButton *mOkButton = nullptr;
};
......@@ -11,15 +11,15 @@
MarkdownCreateLinkWidget::MarkdownCreateLinkWidget(QWidget *parent)
: QWidget(parent)
, mTitle(new QLineEdit(this))
, mLink(new QLineEdit(this))
{
auto mainLayout = new QFormLayout(this);
mainLayout->setObjectName(QStringLiteral("mainlayout"));
mainLayout->setContentsMargins({});
mTitle = new QLineEdit(this);
mTitle->setObjectName(QStringLiteral("title"));
mTitle->setClearButtonEnabled(true);
mLink = new QLineEdit(this);
mLink->setObjectName(QStringLiteral("link"));
mLink->setClearButtonEnabled(true);
......
......@@ -22,7 +22,7 @@ Q_SIGNALS:
private:
void slotEnableButton();
QLineEdit *mTitle = nullptr;
QLineEdit *mLink = nullptr;
QLineEdit *const mTitle;
QLineEdit *const mLink;
};
......@@ -14,6 +14,7 @@
MarkdownPreviewDialog::MarkdownPreviewDialog(QWidget *parent)
: QDialog(parent)
, mPreviewWidget(new MarkdownPreviewWidget(this))
{
setWindowTitle(i18nc("@title:window", "Markdown Rendering Preview"));
setAttribute(Qt::WA_DeleteOnClose);
......@@ -21,7 +22,6 @@ MarkdownPreviewDialog::MarkdownPreviewDialog(QWidget *parent)
auto mainLayout = new QVBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainlayout"));
mPreviewWidget = new MarkdownPreviewWidget(this);
mPreviewWidget->setObjectName(QStringLiteral("previewwidget"));
mainLayout->addWidget(mPreviewWidget);
......
......@@ -22,6 +22,6 @@ public:
private:
void readConfig();
void writeConfig();
MarkdownPreviewWidget *mPreviewWidget = nullptr;
MarkdownPreviewWidget *const mPreviewWidget;
};
......@@ -17,8 +17,8 @@
MarkdownPreviewWidget::MarkdownPreviewWidget(QWidget *parent)
: QWidget(parent)
, mConverter(new MarkdownConverter(this))
{
mConverter = new MarkdownConverter(this);
mConverter->setObjectName(QStringLiteral("converter"));
connect(mConverter, &MarkdownConverter::failed, this, &MarkdownPreviewWidget::converterFailed);
......
......@@ -26,7 +26,7 @@ private:
void slotLinkHovered(const QString &url);
void converterFailed(const QString &msg);
QWebEngineView *mWebView = nullptr;
MarkdownConverter *mConverter = nullptr;
MarkdownConverter *const mConverter;
QLabel *mHoverUrlLabel = nullptr;
};
......@@ -13,6 +13,7 @@
CheckBeforeSendUpdateSmtpDialog::CheckBeforeSendUpdateSmtpDialog(QWidget *parent)
: QDialog(parent)
, mChangeSmtp(new QCheckBox(i18n("Update SMTP server"), this))
{
setWindowTitle(i18nc("@title:window", "Check SMTP server"));
auto mainLayout = new QVBoxLayout(this);
......@@ -23,7 +24,6 @@ CheckBeforeSendUpdateSmtpDialog::CheckBeforeSendUpdateSmtpDialog(QWidget *parent
lab->setWordWrap(true);
mainLayout->addWidget(lab);
mChangeSmtp = new QCheckBox(i18n("Update SMTP server"), this);
mChangeSmtp->setObjectName(QStringLiteral("changesmtp"));
mChangeSmtp->setChecked(false);
mainLayout->addWidget(mChangeSmtp);
......
......@@ -18,6 +18,6 @@ public:
Q_REQUIRED_RESULT bool changeSmtp() const;
private:
QCheckBox *mChangeSmtp = nullptr;
QCheckBox *const mChangeSmtp;
};
......@@ -16,6 +16,7 @@
CheckDuplicateEmailsDialog::CheckDuplicateEmailsDialog(QWidget *parent)
: QDialog(parent)
, mListWidget(new QListWidget(this))
{
setWindowTitle(i18nc("@title:window", "Duplicated emails"));
auto mainLayout = new QVBoxLayout(this);
......@@ -23,7 +24,6 @@ CheckDuplicateEmailsDialog::CheckDuplicateEmailsDialog(QWidget *parent)
lab->setObjectName(QStringLiteral("label"));
mainLayout->addWidget(lab);
mListWidget = new QListWidget(this);
mListWidget->setObjectName(QStringLiteral("listwidget"));
mainLayout->addWidget(mListWidget);
......
......@@ -21,6 +21,6 @@ public:
private:
void readConfig();
void writeConfig();
QListWidget *mListWidget = nullptr;
QListWidget *const mListWidget;
};
......@@ -14,6 +14,7 @@
CheckAttachmentDialog::CheckAttachmentDialog(QWidget *parent)
: QDialog(parent)
, mListWidget(new QListWidget(this))
{
setWindowTitle(i18nc("@title:window", "Check Attachment"));
auto mainLayout = new QVBoxLayout(this);
......@@ -22,7 +23,6 @@ CheckAttachmentDialog::CheckAttachmentDialog(QWidget *parent)
lab->setObjectName(QStringLiteral("lab"));
mainLayout->addWidget(lab);
mListWidget = new QListWidget(this);
mListWidget->setObjectName(QStringLiteral("listwidget"));
mainLayout->addWidget(mListWidget);
......
......@@ -20,6 +20,6 @@ public:
private:
void writeConfig();
void readConfig();
QListWidget *mListWidget = nullptr;
QListWidget *const mListWidget;
};
......@@ -14,12 +14,12 @@
ConfirmAddressConfigureTab::ConfirmAddressConfigureTab(QWidget *parent)
: QWidget(parent)
, mTabWidget(new QTabWidget(this))
{
auto mainLayout = new QVBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainlayout"));
mainLayout->setContentsMargins({});
mTabWidget = new QTabWidget(this);
mTabWidget->setObjectName(QStringLiteral("tabwidget"));
mainLayout->addWidget(mTabWidget);
......
......@@ -31,7 +31,7 @@ Q_SIGNALS:
private:
void initTab(KIdentityManagement::IdentityManager *identityManager);
QTabWidget *mTabWidget = nullptr;
QTabWidget *const mTabWidget;
QList<ConfirmAddressConfigureTabWidget *> mListTabWidget;
};
......@@ -14,11 +14,11 @@
ConfirmAddressConfigureWidget::ConfirmAddressConfigureWidget(QWidget *parent)
: MessageComposer::PluginEditorCheckBeforeSendConfigureWidget(parent)
, mConfirmAddressConfigureTab(new ConfirmAddressConfigureTab(this))
{
auto vboxlayout = new QVBoxLayout(this);
vboxlayout->setContentsMargins({});
vboxlayout->setObjectName(QStringLiteral("mainlayout"));
mConfirmAddressConfigureTab = new ConfirmAddressConfigureTab(this);
mConfirmAddressConfigureTab->setObjectName(QStringLiteral("confirmaddresstab"));
connect(mConfirmAddressConfigureTab, &ConfirmAddressConfigureTab::configureChanged, this, &ConfirmAddressConfigureWidget::configureChanged);
vboxlayout->addWidget(mConfirmAddressConfigureTab);
......
......@@ -22,6 +22,6 @@ public:
private:
void slotEnableChanged(bool state);
ConfirmAddressConfigureTab *mConfirmAddressConfigureTab = nullptr;
ConfirmAddressConfigureTab *const mConfirmAddressConfigureTab;
};
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