1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

WebView: Immediately delete old page in setPage

This commit is contained in:
David Rosca 2018-02-16 12:38:52 +01:00
parent e20c3909e5
commit 78cb4f6509
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8

View File

@ -155,12 +155,12 @@ void WebView::setPage(WebPage *page)
emit m_page->loadFinished(true); emit m_page->loadFinished(true);
} }
m_page->setView(nullptr); m_page->setView(nullptr);
m_page->deleteLater();
} }
page->setParent(this);
QWebEngineView::setPage(page);
delete m_page;
m_page = page; m_page = page;
m_page->setParent(this);
QWebEngineView::setPage(m_page);
if (m_page->isLoading()) { if (m_page->isLoading()) {
emit loadStarted(); emit loadStarted();