summaryrefslogtreecommitdiffstats
path: root/src/webengine/api
diff options
context:
space:
mode:
authorErwin Kandler <e.kandler@gmail.com>2018-08-21 10:46:31 +0200
committerKai Koehne <kai.koehne@qt.io>2018-08-29 13:06:36 +0000
commit0c97d942b0d723f7efbb31f651d2bd75f5537da9 (patch)
treebe62256087de8e0ed36e3397639169a2e6556377 /src/webengine/api
parent33d4b696eba33804da06ae9dda7997feb8b1c50e (diff)
Return http status code for successfully loaded pages
WebEngineView supports getting the http status code (error code) for failed loading requests only. This patch lets the user access the status code for successfully loaded pages as well. Change-Id: Ib8dbdfe94eed4d62e731c736c13f60ebd62a23fa Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/webengine/api')
-rw-r--r--src/webengine/api/qquickwebengineview.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index a840e3cb0..bdd3bfe26 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -474,8 +474,8 @@ void QQuickWebEngineViewPrivate::loadFinished(bool success, const QUrl &url, boo
}
if (success) {
explicitUrl = QUrl();
- QTimer::singleShot(0, q, [q, url]() {
- QQuickWebEngineLoadRequest loadRequest(url, QQuickWebEngineView::LoadSucceededStatus);
+ QTimer::singleShot(0, q, [q, url, errorDescription, errorCode]() {
+ QQuickWebEngineLoadRequest loadRequest(url, QQuickWebEngineView::LoadSucceededStatus, errorDescription, errorCode);
emit q->loadingChanged(&loadRequest);
});
return;