mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
WebView: Correctly transfer loading signals when changing page
This commit is contained in:
parent
1fe7f0c232
commit
f36799a8da
@ -69,7 +69,7 @@ WebPage::WebPage(QObject* parent)
|
||||
: QWebEnginePage(mApp->webProfile(), parent)
|
||||
, m_fileWatcher(0)
|
||||
, m_runningLoop(0)
|
||||
, m_loadProgress(-1)
|
||||
, m_loadProgress(100)
|
||||
, m_blockAlerts(false)
|
||||
, m_secureStatus(false)
|
||||
{
|
||||
|
@ -144,6 +144,10 @@ void WebView::setPage(WebPage *page)
|
||||
}
|
||||
|
||||
if (m_page) {
|
||||
if (m_page->isLoading()) {
|
||||
emit m_page->loadProgress(100);
|
||||
emit m_page->loadFinished(true);
|
||||
}
|
||||
m_page->setView(nullptr);
|
||||
m_page->deleteLater();
|
||||
}
|
||||
@ -152,6 +156,11 @@ void WebView::setPage(WebPage *page)
|
||||
m_page->setParent(this);
|
||||
QWebEngineView::setPage(m_page);
|
||||
|
||||
if (m_page->isLoading()) {
|
||||
emit loadStarted();
|
||||
emit loadProgress(m_page->m_loadProgress);
|
||||
}
|
||||
|
||||
connect(m_page, &WebPage::privacyChanged, this, &WebView::privacyChanged);
|
||||
connect(m_page, &WebPage::printRequested, this, &WebView::printPage);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user