summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/webenginewidgets/browser/webview.cpp6
-rw-r--r--examples/webenginewidgets/browser/webview.h2
-rw-r--r--src/core/web_contents_delegate_qt.cpp1
3 files changed, 4 insertions, 5 deletions
diff --git a/examples/webenginewidgets/browser/webview.cpp b/examples/webenginewidgets/browser/webview.cpp
index ce0f7c41..7ede97b6 100644
--- a/examples/webenginewidgets/browser/webview.cpp
+++ b/examples/webenginewidgets/browser/webview.cpp
@@ -334,7 +334,7 @@ WebView::WebView(QWidget* parent)
connect(this, SIGNAL(loadProgress(int)),
this, SLOT(setProgress(int)));
connect(this, SIGNAL(loadFinished(bool)),
- this, SLOT(loadFinished()));
+ this, SLOT(loadFinished(bool)));
connect(page(), SIGNAL(loadingUrl(QUrl)),
this, SIGNAL(urlChanged(QUrl)));
connect(page(), SIGNAL(iconUrlChanged(QUrl)),
@@ -410,9 +410,9 @@ void WebView::setProgress(int progress)
m_progress = progress;
}
-void WebView::loadFinished()
+void WebView::loadFinished(bool success)
{
- if (100 != m_progress) {
+ if (success && 100 != m_progress) {
qWarning() << "Received finished signal while progress is still:" << progress()
<< "Url:" << url();
}
diff --git a/examples/webenginewidgets/browser/webview.h b/examples/webenginewidgets/browser/webview.h
index 2238abbd..2cedeb79 100644
--- a/examples/webenginewidgets/browser/webview.h
+++ b/examples/webenginewidgets/browser/webview.h
@@ -116,7 +116,7 @@ signals:
private slots:
void setProgress(int progress);
- void loadFinished();
+ void loadFinished(bool success);
void setStatusBarText(const QString &string);
void downloadRequested(const QNetworkRequest &request);
void openLinkInNewTab();
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index b30fcb1e..c7830587 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -170,7 +170,6 @@ void WebContentsDelegateQt::DidFinishLoad(int64, const GURL &url, bool is_main_f
}
if (is_main_frame) {
- m_viewClient->loadProgressChanged(100);
m_viewClient->loadFinished(true, toQt(url));
content::NavigationEntry *entry = web_contents()->GetController().GetActiveEntry();