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

Emit webPageDeleted only from WebView

Closes #2582
This commit is contained in:
David Rosca 2018-02-21 18:54:19 +01:00
parent 5453308571
commit 97a1765b6c
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
2 changed files with 3 additions and 2 deletions

View File

@ -119,8 +119,6 @@ WebPage::WebPage(QObject* parent)
WebPage::~WebPage() WebPage::~WebPage()
{ {
mApp->plugins()->emitWebPageDeleted(this);
if (m_runningLoop) { if (m_runningLoop) {
m_runningLoop->exit(1); m_runningLoop->exit(1);
m_runningLoop = 0; m_runningLoop = 0;

View File

@ -92,6 +92,8 @@ WebView::WebView(QWidget* parent)
WebView::~WebView() WebView::~WebView()
{ {
mApp->plugins()->emitWebPageDeleted(m_page);
WebInspector::unregisterView(this); WebInspector::unregisterView(this);
WebScrollBarManager::instance()->removeWebView(this); WebScrollBarManager::instance()->removeWebView(this);
} }
@ -154,6 +156,7 @@ void WebView::setPage(WebPage *page)
emit m_page->loadProgress(100); emit m_page->loadProgress(100);
emit m_page->loadFinished(true); emit m_page->loadFinished(true);
} }
mApp->plugins()->emitWebPageDeleted(m_page);
m_page->setView(nullptr); m_page->setView(nullptr);
} }