From 7419d27c604bb0e0e321946d8bddd84ba87f86ed Mon Sep 17 00:00:00 2001 From: Christoph Roick Date: Fri, 21 Dec 2018 22:57:22 +0100 Subject: [PATCH] Fix crash in documentation view A QWebEngineProfile must exist longer, than a QWebEnginePage using it. The page is now explicitly deleted before the profile. BUG: 402026 --- kdevplatform/documentation/standarddocumentationview.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/kdevplatform/documentation/standarddocumentationview.cpp b/kdevplatform/documentation/standarddocumentationview.cpp index 9a7ff9bc1d..bf735e2d6e 100644 --- a/kdevplatform/documentation/standarddocumentationview.cpp +++ b/kdevplatform/documentation/standarddocumentationview.cpp @@ -99,6 +99,13 @@ public: QWebEngineView* m_view = nullptr; StandardDocumentationPage* m_page = nullptr; + ~StandardDocumentationViewPrivate() + { + // make sure the page is deleted before the profile + // see https://doc.qt.io/qt-5/qwebenginepage.html#QWebEnginePage-1 + delete m_page; + } + void init(StandardDocumentationView* parent) { // prevent QWebEngine (Chromium) from overriding the signal handlers of KCrash -- GitLab