From 78cb4f65097256f1a7ea44588b571967a3f3a7b7 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Fri, 16 Feb 2018 12:38:52 +0100 Subject: [PATCH] WebView: Immediately delete old page in setPage --- src/lib/webengine/webview.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/webengine/webview.cpp b/src/lib/webengine/webview.cpp index 0e960a39e..3b94b71f1 100644 --- a/src/lib/webengine/webview.cpp +++ b/src/lib/webengine/webview.cpp @@ -155,12 +155,12 @@ void WebView::setPage(WebPage *page) emit m_page->loadFinished(true); } m_page->setView(nullptr); - m_page->deleteLater(); } + page->setParent(this); + QWebEngineView::setPage(page); + delete m_page; m_page = page; - m_page->setParent(this); - QWebEngineView::setPage(m_page); if (m_page->isLoading()) { emit loadStarted();