Commit 66fe610e authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

const'ify pointer

parent fd0285c2
Pipeline #56025 passed with stage
in 14 minutes and 10 seconds
......@@ -45,15 +45,17 @@ template<typename Arg, typename R, typename C> InvokeWrapper<Arg, R, C> invoke(R
ArticleViewerWebEngineWidgetNg::ArticleViewerWebEngineWidgetNg(ArticleViewerWebEngine *customViewer, KActionCollection *ac, QWidget *parent)
: QWidget(parent)
, mArticleViewerNg(customViewer)
, mTextToSpeechWidget(new KPIMTextEdit::TextToSpeechWidget(this))
, mSliderContainer(new KPIMTextEdit::SlideContainer(this))
, mTrackingWarningWidget(new WebEngineViewer::TrackingWarningWidget(this))
{
initializeLayout(ac);
}
ArticleViewerWebEngineWidgetNg::ArticleViewerWebEngineWidgetNg(KActionCollection *ac, QWidget *parent)
: QWidget(parent)
, mArticleViewerNg(nullptr)
: ArticleViewerWebEngineWidgetNg::ArticleViewerWebEngineWidgetNg(nullptr, ac, parent)
{
initializeLayout(ac);
}
void ArticleViewerWebEngineWidgetNg::initializeLayout(KActionCollection *ac)
......@@ -61,11 +63,9 @@ void ArticleViewerWebEngineWidgetNg::initializeLayout(KActionCollection *ac)
auto layout = new QVBoxLayout(this);
layout->setContentsMargins({});
mTextToSpeechWidget = new KPIMTextEdit::TextToSpeechWidget(this);
mTextToSpeechWidget->setObjectName(QStringLiteral("texttospeechwidget"));
layout->addWidget(mTextToSpeechWidget);
mTrackingWarningWidget = new WebEngineViewer::TrackingWarningWidget(this);
mTrackingWarningWidget->setObjectName(QStringLiteral("mTrackingWarningWidget"));
layout->addWidget(mTrackingWarningWidget);
......@@ -78,7 +78,6 @@ void ArticleViewerWebEngineWidgetNg::initializeLayout(KActionCollection *ac)
mArticleViewerNg->createViewerPluginToolManager(ac, this);
mSliderContainer = new KPIMTextEdit::SlideContainer(this);
mSliderContainer->setObjectName(QStringLiteral("slidercontainer"));
mFindBarWebView = new WebEngineViewer::FindBarWebEngineView(mArticleViewerNg, this);
mFindBarWebView->setObjectName(QStringLiteral("findbarwebview"));
......
......@@ -55,9 +55,9 @@ private:
void printRequested(QWebEnginePage *page);
WebEngineViewer::FindBarWebEngineView *mFindBarWebView = nullptr;
ArticleViewerWebEngine *mArticleViewerNg = nullptr;
KPIMTextEdit::TextToSpeechWidget *mTextToSpeechWidget = nullptr;
KPIMTextEdit::SlideContainer *mSliderContainer = nullptr;
WebEngineViewer::TrackingWarningWidget *mTrackingWarningWidget = nullptr;
KPIMTextEdit::TextToSpeechWidget *const mTextToSpeechWidget;
KPIMTextEdit::SlideContainer *const mSliderContainer;
WebEngineViewer::TrackingWarningWidget *const mTrackingWarningWidget;
QPrinter *mCurrentPrinter = 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