diff options
author | Szabolcs David <davidsz@inf.u-szeged.hu> | 2014-09-09 06:23:02 -0700 |
---|---|---|
committer | Szabolcs David <davidsz@inf.u-szeged.hu> | 2014-09-09 16:55:55 +0200 |
commit | 6b6eb9126e4ba66621cdb3c26c0c025a1f2154dc (patch) | |
tree | b56082f1c9a5de4338292795d4ca3d8baa758bf9 /examples | |
parent | 9efb45a0e14bfdb801d542c02ff02fc326787cb3 (diff) |
Fix tst_QWebEngineFrame::progressSignal API test case
This test fails, because we get two loadProgress signals with
the 100 value if the page load is successful.
Change-Id: Idbd68c28ba81f8ff0a5b1d98aece82e7a940f1b9
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/webenginewidgets/browser/webview.cpp | 6 | ||||
-rw-r--r-- | examples/webenginewidgets/browser/webview.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/webenginewidgets/browser/webview.cpp b/examples/webenginewidgets/browser/webview.cpp index ce0f7c418..7ede97b69 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 2238abbd5..2cedeb79b 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(); |