summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@qt.io>2019-04-17 09:41:51 +0200
committerLeena Miettinen <riitta-leena.miettinen@qt.io>2019-05-02 09:53:20 +0000
commit5a4656b9c731418f5568e57060b96b81333ac98f (patch)
tree07dd75659bb04000e5299a74c13a881604882f92
parent3d9bfd7a0a9bff5a3d66366656ae2746f0af97af (diff)
Doc: Add notes about delegating navigation requests
...by overloading QWebEnginePage::acceptNavigationRequest() Task-number: QTBUG-75185 Change-Id: Ieaf9cacd5dd9259159767edba319191cf93f19ad Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc9
-rw-r--r--src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc18
2 files changed, 22 insertions, 5 deletions
diff --git a/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc b/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc
index e3fdc4ff1..9e8cc463c 100644
--- a/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc
+++ b/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -266,7 +266,6 @@
page.runJavaScript("document.documentElement.contentEditable = true");
\endcode
-
\section1 Unavailable Qt WebKit API
The Qt \WebKit classes and methods in this list will not be available in \QWE.
@@ -310,5 +309,11 @@
engine process them by overloading the QWebEnginePage::acceptNavigationRequest()
function. This is necessary when an HTML document is used as part of the user interface,
and not to display external data, for example, when displaying a list of results.
+
+ \note \l{QWebEnginePage::}{acceptNavigationRequest()} starts the
+ loading process and emits the \l{QWebEnginePage::}{loadStarted()}
+ signal \e before the request is accepted or rejected. Therefore, a
+ \l{QWebEnginePage::}{loadFinished()} signal that returns \c false
+ is to be expected even after delegating the request.
\endtable
*/
diff --git a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
index 9aca48ebf..274b46730 100644
--- a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
+++ b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2015 The Qt Company Ltd.
+ Copyright (C) 2019 The Qt Company Ltd.
Copyright (C) 2008, 2009, 2012 Nokia Corporation and/or its subsidiary(-ies)
Copyright (C) 2007 Staikos Computing Services Inc.
Copyright (C) 2007 Apple Inc.
@@ -381,6 +381,11 @@
used as part of the user interface, and not to display external data, for example, when
displaying a list of results.
+ \note The loading process is started and the loadStarted() signal is emitted
+ \e before the request is accepted or rejected. Therefore, a loadFinished()
+ signal that returns \c false is to be expected even after delegating the
+ request.
+
The \l{QWebEngineUrlRequestInterceptor} class offers further options for intercepting and
manipulating requests.
*/
@@ -528,7 +533,7 @@
This signal is emitted when a page starts loading content.
- \sa loadFinished()
+ \sa loadFinished(), acceptNavigationRequest()
*/
/*!
@@ -548,7 +553,14 @@
is independent of script execution or page rendering.
\a ok will indicate whether the load was successful or any error occurred.
- \sa loadStarted()
+ \note Navigation requests can be delegated to the Qt application instead
+ of having the HTML handler engine process them by overloading the
+ acceptNavigationRequest() function. Because the loading process is started
+ and the loadStarted() signal is emitted \e before the request is accepted
+ or rejected, a \c loadFinished() signal that returns \c false is to be
+ expected even after delegating the request.
+
+ \sa loadStarted(), acceptNavigationRequest()
*/
/*!