summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-01-16 18:18:07 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2017-01-16 18:18:07 +0000
commit8234695a88ea853a19ccbe25157f23a632433b9a (patch)
tree8e1d54c8a3ccaa4e9a5de93bd62dec4d89a1e43d
parent51d5737fa45b62ff9fc769cdb8d3a238dbe9d1cb (diff)
parent7a85314056409b79c0db44f9bb7a2258a6ed557f (diff)
Merge "Merge remote-tracking branch 'origin/5.8.0' into 5.8" into refs/staging/5.8
m---------src/3rdparty0
-rw-r--r--src/webengine/api/qquickwebenginedialogrequests.cpp7
-rw-r--r--src/webengine/api/qquickwebenginedownloaditem.cpp2
-rw-r--r--src/webengine/api/qquickwebengineloadrequest.cpp20
-rw-r--r--src/webengine/api/qquickwebenginenavigationrequest.cpp59
-rw-r--r--src/webengine/api/qquickwebenginesettings.cpp2
-rw-r--r--src/webengine/doc/src/webengineview.qdoc62
7 files changed, 117 insertions, 35 deletions
diff --git a/src/3rdparty b/src/3rdparty
-Subproject af5276a40a0c6e45eede1fd929dd8eb927473ec
+Subproject 15d257fd921f37b32ef643225f21df0ea24c830
diff --git a/src/webengine/api/qquickwebenginedialogrequests.cpp b/src/webengine/api/qquickwebenginedialogrequests.cpp
index 641793e12..c57f4c76f 100644
--- a/src/webengine/api/qquickwebenginedialogrequests.cpp
+++ b/src/webengine/api/qquickwebenginedialogrequests.cpp
@@ -312,11 +312,10 @@ QString QQuickWebEngineJavaScriptDialogRequest::message() const
}
/*!
- \qmlproperty string JavaScriptDialogRequest::defaultPrompt
+ \qmlproperty string JavaScriptDialogRequest::defaultText
\readonly
- The default text if the requested dialog box is of
- the \l type PromptDialog.
+ The default prompt text, if the requested dialog is a prompt.
*/
@@ -811,7 +810,7 @@ QString QQuickWebEngineFormValidationMessageRequest::subText() const
}
/*!
- \qmlproperty enumeration ValidationMessageRequest::type
+ \qmlproperty enumeration FormValidationMessageRequest::type
\readonly
The type of the form validation message request.
diff --git a/src/webengine/api/qquickwebenginedownloaditem.cpp b/src/webengine/api/qquickwebenginedownloaditem.cpp
index 070ba225a..03058fdb3 100644
--- a/src/webengine/api/qquickwebenginedownloaditem.cpp
+++ b/src/webengine/api/qquickwebenginedownloaditem.cpp
@@ -183,6 +183,8 @@ quint32 QQuickWebEngineDownloadItem::id() const
Download is in progress.
\value WebEngineDownloadItem.DownloadCompleted
Download completed successfully.
+ \value WebEngineDownloadItem.DownloadCancelled
+ Download was cancelled by the user.
\value WebEngineDownloadItem.DownloadInterrupted
Download has been interrupted (by the server or because of lost connectivity).
*/
diff --git a/src/webengine/api/qquickwebengineloadrequest.cpp b/src/webengine/api/qquickwebengineloadrequest.cpp
index 47ec17c16..b3422c516 100644
--- a/src/webengine/api/qquickwebengineloadrequest.cpp
+++ b/src/webengine/api/qquickwebengineloadrequest.cpp
@@ -120,6 +120,26 @@ QString QQuickWebEngineLoadRequest::errorString() const
return d->errorString;
}
+/*!
+ \qmlproperty enumeration WebEngineLoadRequest::errorDomain
+ This enumeration holds the type of a load request error:
+
+ \value WebEngineView.NoErrorDomain
+ Error type is not known.
+ \value WebEngineView.InternalErrorDomain
+ Content cannot be interpreted by Qt WebEngine.
+ \value WebEngineView.ConnectionErrorDomain
+ Error results from a faulty network connection.
+ \value WebEngineView.CertificateErrorDomain
+ Error is related to the SSL/TLS certificate.
+ \value WebEngineView.HttpErrorDomain
+ Error is related to the HTTP connection.
+ \value WebEngineView.FtpErrorDomain
+ Error is related to the FTP connection.
+ \value WebEngineView.DnsErrorDomain
+ Error is related to the DNS connection.
+*/
+
QQuickWebEngineView::ErrorDomain QQuickWebEngineLoadRequest::errorDomain() const
{
Q_D(const QQuickWebEngineLoadRequest);
diff --git a/src/webengine/api/qquickwebenginenavigationrequest.cpp b/src/webengine/api/qquickwebenginenavigationrequest.cpp
index a738ece80..a6e253561 100644
--- a/src/webengine/api/qquickwebenginenavigationrequest.cpp
+++ b/src/webengine/api/qquickwebenginenavigationrequest.cpp
@@ -63,6 +63,20 @@ public:
bool isMainFrame;
};
+/*!
+ \qmltype WebEngineNavigationRequest
+ \instantiates QQuickWebEngineNavigationRequest
+ \inqmlmodule QtWebEngine
+ \since QtWebEngine 1.0
+
+ \brief Represents a request for navigating to a web page as part of
+ \l{WebEngineView::navigationRequested()}.
+
+ To accept or reject a request, set \l action to
+ \c WebEngineNavigationRequest.AcceptRequest or
+ \c WebEngineNavigationRequest.IgnoreRequest.
+*/
+
QQuickWebEngineNavigationRequest::QQuickWebEngineNavigationRequest(const QUrl& url, QQuickWebEngineView::NavigationType navigationType, bool mainFrame, QObject* parent)
: QObject(parent)
, d_ptr(new QQuickWebEngineNavigationRequestPrivate(url, navigationType, mainFrame))
@@ -73,6 +87,17 @@ QQuickWebEngineNavigationRequest::~QQuickWebEngineNavigationRequest()
{
}
+/*!
+ \qmlproperty enumeration WebEngineNavigationRequest::action
+
+ Whether to accept or ignore the navigation request.
+
+ \value WebEngineNavigationRequest.AcceptRequest
+ Accepts a navigation request.
+ \value WebEngineNavigationRequest.IgnoreRequest
+ Ignores a navigation request.
+*/
+
void QQuickWebEngineNavigationRequest::setAction(QQuickWebEngineView::NavigationRequestAction action)
{
Q_D(QQuickWebEngineNavigationRequest);
@@ -83,6 +108,13 @@ void QQuickWebEngineNavigationRequest::setAction(QQuickWebEngineView::Navigation
emit actionChanged();
}
+/*!
+ \qmlproperty url WebEngineNavigationRequest::url
+ \readonly
+
+ The URL of the web page to go to.
+*/
+
QUrl QQuickWebEngineNavigationRequest::url() const
{
Q_D(const QQuickWebEngineNavigationRequest);
@@ -95,12 +127,39 @@ QQuickWebEngineView::NavigationRequestAction QQuickWebEngineNavigationRequest::a
return d->action;
}
+/*!
+ \qmlproperty enumeration WebEngineNavigationRequest::navigationType
+ \readonly
+
+ The method used to navigate to a web page.
+
+ \value WebEngineNavigationRequest.LinkClickedNavigation
+ Clicking a link.
+ \value WebEngineNavigationRequest.TypedNavigation
+ Entering an URL on the address bar.
+ \value WebEngineNavigationRequest.FormSubmittedNavigation
+ Submitting a form.
+ \value WebEngineNavigationRequest.BackForwardNavigation
+ Using navigation history to go to the previous or next page.
+ \value WebEngineNavigationRequest.ReloadNavigation
+ Reloading the page.
+ \value WebEngineNavigationRequest.OtherNavigation
+ Using some other method to go to a page.
+*/
+
QQuickWebEngineView::NavigationType QQuickWebEngineNavigationRequest::navigationType() const
{
Q_D(const QQuickWebEngineNavigationRequest);
return d->navigationType;
}
+/*!
+ \qmlproperty bool WebEngineNavigationRequest::isMainFrame
+ \readonly
+
+ Whether the navigation issue is requested for a top level page.
+*/
+
bool QQuickWebEngineNavigationRequest::isMainFrame() const
{
Q_D(const QQuickWebEngineNavigationRequest);
diff --git a/src/webengine/api/qquickwebenginesettings.cpp b/src/webengine/api/qquickwebenginesettings.cpp
index 09bf2708e..c9eb9d342 100644
--- a/src/webengine/api/qquickwebenginesettings.cpp
+++ b/src/webengine/api/qquickwebenginesettings.cpp
@@ -267,7 +267,7 @@ bool QQuickWebEngineSettings::webGLEnabled() const
\qmlproperty bool WebEngineSettings::accelerated2dCanvasEnabled
\since QtWebEngine 1.3
- Specifies whether the HTML 5 2D canvas should be a OpenGL framebuffer.
+ Specifies whether the HTML 5 2D canvas should be an OpenGL framebuffer.
This makes many painting operations faster, but slows down pixel access.
Enabled by default if available.
diff --git a/src/webengine/doc/src/webengineview.qdoc b/src/webengine/doc/src/webengineview.qdoc
index 418da9f9d..364fa6c8a 100644
--- a/src/webengine/doc/src/webengineview.qdoc
+++ b/src/webengine/doc/src/webengineview.qdoc
@@ -387,8 +387,8 @@
\qmlmethod void WebEngineView::runJavaScript(string script, variant callback)
Runs the specified \a script in the content of the web view.
- In case a callback function is provided, it will be invoked after the script
- finishes running.
+ The \a callback parameter is optional. If a callback function is provided,
+ it will be invoked after the script finishes running.
\code
runJavaScript("document.title", function(result) { console.log(result); });
@@ -513,28 +513,8 @@
This signal is emitted when a page load begins, ends, or fails.
When handling the signal with \c onLoadingChanged, various read-only
- parameters are available on the \a loadRequest:
-
- \table
- \header
- \li Property
- \li Description
- \row
- \li url
- \li The location of the resource that is loading.
- \row
- \li status
- \li The \l{LoadStatus}{load status} of the page.
- \row
- \li errorString
- \li The description of load error.
- \row
- \li errorCode
- \li The HTTP error code.
- \row
- \li errorDomain
- \li The high-level \l{ErrorDomain}{error type}.
- \endtable
+ parameters are available on the WebEngineLoadRequest specified by
+ \a loadRequest.
\sa loading, LoadStatus, ErrorDomain
*/
@@ -576,7 +556,7 @@
*/
/*!
- \qmlsignal WebEngineView::newViewRequested(WebEngineViewRequest request)
+ \qmlsignal WebEngineView::newViewRequested(WebEngineNewViewRequest request)
\since QtWebEngine 1.1
This signal is emitted when a page load is requested to happen in a separate
@@ -652,7 +632,7 @@
\value WebEngineView.ConnectionErrorDomain
Error results from faulty network connection.
\value WebEngineView.CertificateErrorDomain
- Error related to the SSL/TLS certficate.
+ Error related to the SSL/TLS certificate.
\value WebEngineView.HttpErrorDomain
Error related to the HTTP connection.
\value WebEngineView.FtpErrorDomain
@@ -681,6 +661,9 @@
\value WebEngineView.LoadStartedStatus
Page is currently loading.
+ \value WebEngineView.LoadStoppedStatus
+ Loading the page was stopped by the stop() method or by the loader
+ code or network stack in Chromium.
\value WebEngineView.LoadSucceededStatus
Page has successfully loaded, and is not currently loading.
\value WebEngineView.LoadFailedStatus
@@ -1021,8 +1004,13 @@
*/
/*!
+ \qmlproperty url WebEngineFullScreenRequest::origin
+ \readonly
+ The URL of the web page that issued the fullscreen request.
+*/
+
+/*!
\qmlproperty bool WebEngineFullScreenRequest::toggleOn
- \since QtWebEngine 1.1
\readonly
Returns \c{true} if the application should toggle fullscreen mode on, \c{false} otherwise.
@@ -1032,7 +1020,6 @@
/*!
\qmlmethod void WebEngineFullScreenRequest::accept()
- \since QtWebEngine 1.1
Call this method to accept the fullscreen request. It sets the WebEngineView::isFullScreen
property to be equal to toggleOn.
@@ -1056,6 +1043,11 @@
*/
/*!
+ \qmlmethod void WebEngineFullScreenRequest::reject()
+ Rejects a fullscreen request.
+*/
+
+/*!
\qmlproperty bool WebEngineView::audioMuted
\brief The state of whether the current page audio is muted.
\since QtWebEngine 1.3
@@ -1109,11 +1101,14 @@
*/
/*!
- \qmlmethod void WebEngineView::printToPdf(const QString &filePath, PrintedPageSizeId pageSizeId, PrintedPageOrientation orientation)
+ \qmlmethod void WebEngineView::printToPdf(const string filePath, PrintedPageSizeId pageSizeId, PrintedPageOrientation orientation)
\since QtWebEngine 1.3
Prints the WebEngineView's current content to a PDF document and stores it under \a filePath. The document's size will be determined
by the value of \a pageSizeId and its orientation will be determined using \a orientation.
+
+ If you leave out \a pageSizeID, it defaults to \c A4. If you leave out
+ \a orientation, it defaults to \c Portrait.
*/
/*!
@@ -1125,6 +1120,9 @@
The \a resultCallback must take a string parameter. This string will contain the document's data upon successful printing and an empty
string otherwise.
+
+ If you leave out \a pageSizeID, it defaults to \c A4. If you leave out
+ \a orientation, it defaults to \c Portrait.
*/
/*!
@@ -1135,7 +1133,7 @@
*/
/*!
- \qmlsignal void WebEngineView::wasRecentlyAudibleChanged(bool wasRecentlyAudible)
+ \qmlsignal WebEngineView::wasRecentlyAudibleChanged(bool wasRecentlyAudible)
\since QtWebEngine 1.3
This signal is emitted when the page's audible state is changed, due to audio
@@ -1229,3 +1227,7 @@
\note Signal handlers need to call \c{request.accepted = true} to prevent a
default context menu from showing up.
*/
+
+/*! \qmlsignal WebEngineView::navigationRequested(WebEngineNavigationRequest request)
+ This signal is emitted when the navigation request \a request is issued.
+*/