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

const'ify pointer

parent 686e8a89
......@@ -17,7 +17,9 @@
MarkdownPreviewWidget::MarkdownPreviewWidget(QWidget *parent)
: QWidget(parent)
, mWebView(new QWebEngineView(this))
, mConverter(new MarkdownConverter(this))
, mHoverUrlLabel(new QLabel(this))
{
mConverter->setObjectName(QStringLiteral("converter"));
connect(mConverter, &MarkdownConverter::failed, this, &MarkdownPreviewWidget::converterFailed);
......@@ -27,7 +29,6 @@ MarkdownPreviewWidget::MarkdownPreviewWidget(QWidget *parent)
mainLayout->setContentsMargins({});
auto page = new MarkdownEnginePage(this);
mWebView = new QWebEngineView(this);
mWebView->setPage(page);
mWebView->resize(600, 800);
......@@ -50,7 +51,6 @@ MarkdownPreviewWidget::MarkdownPreviewWidget(QWidget *parent)
mWebView->setObjectName(QStringLiteral("webengine"));
mainLayout->addWidget(mWebView);
mHoverUrlLabel = new QLabel(this);
mHoverUrlLabel->setObjectName(QStringLiteral("mHoverUrlLabel"));
mainLayout->addWidget(mHoverUrlLabel);
......
......@@ -25,8 +25,8 @@ public Q_SLOTS:
private:
void slotLinkHovered(const QString &url);
void converterFailed(const QString &msg);
QWebEngineView *mWebView = nullptr;
QWebEngineView *const mWebView;
MarkdownConverter *const mConverter;
QLabel *mHoverUrlLabel = nullptr;
QLabel *const mHoverUrlLabel;
};
Supports Markdown
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