summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJerome Pasion <jerome.pasion@digia.com>2014-08-31 21:18:49 +0200
committerJerome Pasion <jerome.pasion@digia.com>2014-09-29 21:35:47 +0200
commitfa05ae77ded8c5ddc109bf7acfcb8b833b6b80f9 (patch)
tree1d1f1e70560f6a27828c3bf56d5881e7d2ac9dd5
parent390391c8138b0138954da0d50537dbb138758bd9 (diff)
Doc: Edited docs according to writing guidelines.
-added \since and added commands such as \readonly -converted enum values to use \value -edited language and other minor issues. -only the main Qt WebEngine, the widget docs will be edited later. Change-Id: Ifbb76a6472b5efede15daebc78d605b8b449d957 Task-number: QTBUG-40757 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
-rw-r--r--src/webengine/api/qquickwebengineloadrequest.cpp18
-rw-r--r--src/webengine/doc/src/qquickwebengineview_lgpl.qdoc160
2 files changed, 85 insertions, 93 deletions
diff --git a/src/webengine/api/qquickwebengineloadrequest.cpp b/src/webengine/api/qquickwebengineloadrequest.cpp
index 7e207ea3f..a29381af6 100644
--- a/src/webengine/api/qquickwebengineloadrequest.cpp
+++ b/src/webengine/api/qquickwebengineloadrequest.cpp
@@ -60,13 +60,14 @@ public:
\qmltype WebEngineLoadRequest
\instantiates QQuickWebEngineLoadRequest
\inqmlmodule QtWebEngine 1.0
+ \since QtWebEngine 1.0
\brief A utility class for the WebEngineView::loadingChanged signal.
- This class contains information about a requested load of a web page, like the URL and
+ This class contains information about a requested load of a web page, such as the URL and
current loading status (started, finished, failed).
- \sa WebEngineView::onLoadingChanged
+ \sa WebEngineView::loadingChanged
*/
QQuickWebEngineLoadRequest::QQuickWebEngineLoadRequest(const QUrl& url, QQuickWebEngineView::LoadStatus status, const QString& errorString, int errorCode, QQuickWebEngineView::ErrorDomain errorDomain, QObject* parent)
: QObject(parent)
@@ -91,16 +92,13 @@ QUrl QQuickWebEngineLoadRequest::url() const
/*!
\qmlproperty enumeration WebEngineLoadRequest::status
- The load status of a web page load request.
+ This enumeration represents the load status of a web page load request.
- \list
- \li WebEngineView::LoadStartedStatus - the page is currently loading.
- \li WebEngineView::LoadSucceededStatus - the page has been loaded with success.
- \li WebEngineView::LoadFailedStatus - the page has failed loading.
- \endlist
+ \value WebEngineView::LoadStartedStatus The page is currently loading.
+ \value WebEngineView::LoadSucceededStatus The page has been loaded with success.
+ \value WebEngineView::LoadFailedStatus The page has failed loading.
- \sa WebEngineLoadRequest
- \sa WebEngineView::onLoadingChanged
+ \sa WebEngineView::loadingChanged
*/
QQuickWebEngineView::LoadStatus QQuickWebEngineLoadRequest::status() const
{
diff --git a/src/webengine/doc/src/qquickwebengineview_lgpl.qdoc b/src/webengine/doc/src/qquickwebengineview_lgpl.qdoc
index fb38c1108..379c45e1c 100644
--- a/src/webengine/doc/src/qquickwebengineview_lgpl.qdoc
+++ b/src/webengine/doc/src/qquickwebengineview_lgpl.qdoc
@@ -76,14 +76,15 @@
\qmltype WebEngineView
\instantiates QQuickWebEngineView
\inqmlmodule QtWebEngine 1.0
- \brief A WebEngineView renders web content within a QML application
+ \since QtWebEngine 1.0
+ \brief A WebEngineView renders web content within a QML application.
*/
/*!
\qmlmethod void WebEngineView::goBack()
Go backward within the browser's session history, if possible.
- (Equivalent to the \c{window.history.back()} DOM method.)
+ This function is equivalent to the \c{window.history.back()} DOM method.
\sa WebEngineView::canGoBack
*/
@@ -92,20 +93,20 @@
\qmlmethod void WebEngineView::goForward()
Go forward within the browser's session history, if possible.
- (Equivalent to the \c{window.history.forward()} DOM method.)
+ This function is equivalent to the \c{window.history.forward()} DOM method.
*/
/*!
\qmlmethod void WebEngineView::stop()
- Stop loading the current page.
+ Stops loading the current page.
*/
/*!
\qmlmethod void WebEngineView::reload()
- Reload the current page. (Equivalent to the
- \c{window.location.reload()} DOM method.)
+ Reloads the current page. This function is equivalent to the
+ \c{window.location.reload()} DOM method.
*/
/*!
@@ -120,13 +121,15 @@
/*!
\qmlproperty url WebEngineView::icon
+ \readonly
- The location of the currently displaying Web site icon, also known as favicon
- or shortcut icon. This read-only URL corresponds to the image used within a
- mobile browser application to represent a bookmarked page on the device's home
- screen.
+ This property holds the location of the currently displaying web site icon,
+ also known as favicon or shortcut icon. This read-only URL corresponds to
+ the image used within a mobile browser application to represent a
+ bookmarked page on the device's home screen.
- This example uses the \c{icon} property to build an \c{Image} element:
+ The following snippet uses the \c{icon} property to build an \c{Image}
+ component:
\code
Image {
@@ -140,8 +143,8 @@
/*!
\qmlproperty int WebEngineView::loadProgress
- The amount of the page that has been loaded, expressed as an integer
- percentage in the range from \c{0} to \c{100}.
+ This property holds the amount of the page that has been loaded, expressed
+ as an integer percentage in the range from \c{0} to \c{100}.
*/
/*!
@@ -166,23 +169,24 @@
/*!
\qmlproperty string WebEngineView::title
+ \readonly
- The title of the currently displaying HTML page, a read-only value
- that reflects the contents of the \c{<title>} tag.
+ This property holds the title of the currently displaying HTML page, a
+ read-only value that reflects the contents of the \c{<title>} tag.
*/
/*!
\qmlmethod void WebEngineView::loadHtml(string html, url baseUrl)
\brief Loads the specified \a html as the content of the web view.
- (This method offers a lower-level alternative to the \c{url} property,
- which references HTML pages via URL.)
+ This method offers a lower-level alternative to the \c{url} property,
+ which references HTML pages via URL.
External objects such as stylesheets or images referenced in the HTML
- document are located relative to \a baseUrl. For example if provided \a html
- was originally retrieved from \c http://www.example.com/documents/overview.html
- and that was the base url, then an image referenced with the relative url \c diagram.png
- would be looked for at \c{http://www.example.com/documents/diagram.png}.
+ document should be located relative to \a baseUrl. For example, if \a html
+ is retrieved from \c http://www.example.com/documents/overview.html, which
+ is the base url, then an image referenced with the relative url, \c diagram.png,
+ should be at \c{http://www.example.com/documents/diagram.png}.
\sa WebEngineView::url
*/
@@ -202,85 +206,75 @@
*/
/*!
- \qmlsignal WebEngineView::onLoadingChanged(loadRequest)
+ \qmlsignal WebEngineView::loadingChanged(loadRequest)
- Occurs when any page load begins, ends, or fails. Various read-only
- parameters are available on the \a loadRequest:
-
- \list
-
- \li \c{url}: the location of the resource that is loading.
-
- \li \c{status}: Reflects one of four load states:
- \c{LoadStartedStatus}, \c{LoadStoppedStatus},
- \c{LoadSucceededStatus}, or \c{LoadFailedStatus}.
- See \c{WebEngineView::LoadStatus}.
+ This signal is emitted when a page load begins, ends, or fails.
+ The corresponding handler is onLoadingChanged.
- \li \c{errorString}: description of load error.
-
- \li \c{errorCode}: HTTP error code.
-
- \li \c{errorDomain}: high-level error types, one of
- \c{NetworkErrorDomain}, \c{HttpErrorDomain}, \c{InternalErrorDomain},
- \c{DownloadErrorDomain}, or \c{NoErrorDomain}. See
- \l{WebEngineView::ErrorDomain}.
+ When handling the signal with onLoadingChanged, various read-only
+ parameters are available on the \a loadRequest:
- \endlist
+ \table
+ \header
+ \li Property
+ \li Description
+ \row
+ \li url
+ \li The location of the resource that is loading.
+ \row
+ \li status
+ \li Reflects one of four load states:
+ \c{WebEngineView::LoadStartedStatus}, \c{WebEngineView::LoadStoppedStatus},
+ \c{WebEngineView::LoadSucceededStatus}, or \c{WebEngineView::LoadFailedStatus}.
+ See WebEngineLoadRequest::status and WebEngineView::LoadStatus.
+ \row
+ \li errorString
+ \li The description of load error.
+ \row
+ \li errorCode
+ \li The HTTP error code.
+ \row
+ \li errorDomain
+ \li The high-level error types, one of
+ \c{WebEngineView::ConnectionErrorDomain}, \c{WebEngineView::HttpErrorDomain}, \c{WebEngineView::InternalErrorDomain},
+ \c{WebEngineView::DownloadErrorDomain}, or \c{WebEngineView::NoErrorDomain}. See
+ \l{WebEngineView::ErrorDomain} for the full list.
+ \endtable
\sa WebEngineView::loading
*/
/*!
- \qmlsignal WebEngineView::onLinkHovered(hoveredUrl, hoveredTitle)
+ \qmlsignal WebEngineView::linkHovered(hoveredUrl, hoveredTitle)
Within a mouse-driven interface, this signal is emitted when a mouse
pointer passes over a link, corresponding to the \c{mouseover} DOM
- event. (May also occur in touch interfaces for \c{mouseover} events
- that are not cancelled with \c{preventDefault()}.) The \a{hoveredUrl}
- provides the link's location, and the \a{hoveredTitle} is any avalable
+ event. This event may also occur in touch interfaces for \c{mouseover}
+ events that are not cancelled with \c{preventDefault()}. \a{hoveredUrl}
+ provides the link's location, and \a{hoveredTitle} is any available
link text.
+
+ The corresponding handler is onLinkHovered.
*/
/*!
\qmlproperty enumeration WebEngineView::ErrorDomain
- Details various high-level error types.
-
- \table
-
- \header
- \li Constant
- \li Description
-
- \row
- \li InternalErrorDomain
- \li Content fails to be interpreted by Qt WebEngine.
-
- \row
- \li ConnectionErrorDomain
- \li Error results from faulty network connection.
-
- \row
- \li HttpErrorDomain
- \li Error is produced by server.
-
- \row
- \li CertificateErrorDomain
- \li Error related to the SSL/TLS certficate.
-
- \row
- \li FtpErrorDomain
- \li An error related to the file transfer protocol.
-
- \row
- \li DnsErrorDomain
- \li An error related to DNS lookup.
-
- \row
- \li NoErrorDomain
- \li Unspecified fallback error.
-
- \endtable
+ This enumeration details various high-level error types.
+
+ \value NoErrorDomain
+ \value WebEngineView::InternalErrorDomain
+ Content fails to be interpreted by Qt WebEngine.
+ \value WebEngineView::ConnectionErrorDomain
+ Error results from faulty network connection.
+ \value WebEngineView::CertificateErrorDomain
+ Error related to the SSL/TLS certficate.
+ \value WebEngineView::HttpErrorDomain
+ Error related to the HTTP connection.
+ \value WebEngineView::FtpErrorDomain
+ Error related to the FTP connection.
+ \value WebEngineView::DnsErrorDomain
+ Error related to the DNS connection.
*/
/*!