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

const'ify pointer

parent 348a9e1f
Pipeline #57082 passed with stage
in 41 minutes and 48 seconds
......@@ -11,11 +11,11 @@
using namespace TemplateParser;
TemplateParserEmailAddressRequesterLineEdit::TemplateParserEmailAddressRequesterLineEdit(QWidget *parent)
: TemplateParser::TemplateParserEmailAddressRequesterBase(parent)
, mLineEdit(new QLineEdit(this))
{
auto mainLayout = new QHBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainlayout"));
mainLayout->setContentsMargins({});
mLineEdit = new QLineEdit(this);
mLineEdit->setObjectName(QStringLiteral("lineedit"));
mainLayout->addWidget(mLineEdit);
connect(mLineEdit, &QLineEdit::textChanged, this, &TemplateParserEmailAddressRequesterLineEdit::textChanged);
......
......@@ -23,6 +23,6 @@ public:
void clear() override;
private:
QLineEdit *mLineEdit = nullptr;
QLineEdit *const mLineEdit;
};
}
......@@ -18,11 +18,11 @@ static const char myDeveloperToolDialogConfigGroupName[] = "DeveloperToolDialog"
using namespace WebEngineViewer;
DeveloperToolDialog::DeveloperToolDialog(QWidget *parent)
: QDialog(parent)
, mDeveloperToolWidget(new DeveloperToolWidget(this))
{
auto mainLayout = new QVBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainLayout"));
mDeveloperToolWidget = new DeveloperToolWidget(this);
mDeveloperToolWidget->setObjectName(QStringLiteral("mDeveloperToolWidget"));
mainLayout->addWidget(mDeveloperToolWidget);
......
......@@ -23,6 +23,6 @@ public:
private:
void readConfig();
void writeConfig();
DeveloperToolWidget *mDeveloperToolWidget = nullptr;
DeveloperToolWidget *const mDeveloperToolWidget;
};
}
......@@ -12,12 +12,12 @@
using namespace WebEngineViewer;
DeveloperToolWidget::DeveloperToolWidget(QWidget *parent)
: QWidget(parent)
, mWebEngineView(new QWebEngineView(this))
{
auto mainLayout = new QVBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainLayout"));
mainLayout->setContentsMargins({});
mWebEngineView = new QWebEngineView(this);
mWebEngineView->setObjectName(QStringLiteral("mWebEngineView"));
mainLayout->addWidget(mWebEngineView);
mEnginePage = new QWebEnginePage(this);
......
......@@ -21,7 +21,7 @@ public:
QWebEnginePage *enginePage() const;
private:
QWebEngineView *mWebEngineView = nullptr;
QWebEngineView *const mWebEngineView;
QWebEnginePage *mEnginePage = nullptr;
};
}
......@@ -13,18 +13,18 @@ using namespace WebEngineViewer;
class WebEngineViewer::FindBarWebEngineViewPrivate
{
public:
FindBarWebEngineViewPrivate()
FindBarWebEngineViewPrivate(QWebEngineView *view)
: mView(view)
{
}
QWebEngineView *mView = nullptr;
QWebEngineView *const mView;
};
FindBarWebEngineView::FindBarWebEngineView(QWebEngineView *view, QWidget *parent)
: FindBarBase(parent)
, d(new WebEngineViewer::FindBarWebEngineViewPrivate)
, d(new WebEngineViewer::FindBarWebEngineViewPrivate(view))
{
d->mView = view;
}
FindBarWebEngineView::~FindBarWebEngineView()
......
......@@ -20,6 +20,7 @@ static const char myMailTrackingDetailsDialogConfigGroupName[] = "MailTrackingDe
}
TrackingDetailsDialog::TrackingDetailsDialog(QWidget *parent)
: QDialog(parent)
, mDetails(new KPIMTextEdit::RichTextEditorWidget(this))
{
setWindowTitle(i18nc("@title:window", "Details"));
setAttribute(Qt::WA_DeleteOnClose);
......@@ -33,7 +34,6 @@ TrackingDetailsDialog::TrackingDetailsDialog(QWidget *parent)
connect(buttonBox, &QDialogButtonBox::rejected, this, &TrackingDetailsDialog::reject);
connect(buttonBox->button(QDialogButtonBox::Close), &QPushButton::clicked, this, &TrackingDetailsDialog::close);
mDetails = new KPIMTextEdit::RichTextEditorWidget(this);
mDetails->setObjectName(QStringLiteral("detail"));
mainLayout->addWidget(mDetails);
mainLayout->addWidget(buttonBox);
......
......@@ -29,6 +29,6 @@ private:
void writeConfig();
void readConfig();
KPIMTextEdit::RichTextEditorWidget *mDetails = nullptr;
KPIMTextEdit::RichTextEditorWidget *const mDetails;
};
}
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