summaryrefslogtreecommitdiffstats
path: root/src/core/api/qwebengineurlrequestjob.cpp
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@theqtcompany.com>2015-10-06 14:06:40 +0200
committerLeena Miettinen <riitta-leena.miettinen@theqtcompany.com>2015-10-06 12:31:59 +0000
commit8229f7d0e841dc996f74978336a8d6ef851fc3ad (patch)
tree502fdc09f74da8ac325206354f88ecabb2d265b4 /src/core/api/qwebengineurlrequestjob.cpp
parenta81a3f4d06b48e5dbe56ba8f3db48d5ed4fab7c7 (diff)
Doc: edit QWebEngineUrlRequestJob docs
- Add docs for the Error enum - Fix incorrect argument name - Edit for grammar Change-Id: I6c4364eb0a4dd52e38eaf1cde46aec4ddff99532 Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Diffstat (limited to 'src/core/api/qwebengineurlrequestjob.cpp')
-rw-r--r--src/core/api/qwebengineurlrequestjob.cpp38
1 files changed, 29 insertions, 9 deletions
diff --git a/src/core/api/qwebengineurlrequestjob.cpp b/src/core/api/qwebengineurlrequestjob.cpp
index d9f3833b9..0e56ba5b3 100644
--- a/src/core/api/qwebengineurlrequestjob.cpp
+++ b/src/core/api/qwebengineurlrequestjob.cpp
@@ -48,18 +48,36 @@ QT_BEGIN_NAMESPACE
\since 5.6
A QWebEngineUrlRequestJob is given to QWebEngineUrlSchemeHandler::requestStarted() and must
- be handled by the derived implementations of the class.
+ be handled by the derived implementations of the class. The job can be handled by calling
+ either reply(), redirect(), or fail().
- A job can be handled by calling either reply(), redirect() or fail().
-
- The class is owned by QtWebEngine and does not need to be deleted. Note QtWebEngine may delete
- the job when it is no longer needed, so the signal QObject::destroyed() must be monitored if
- a pointer to the object is stored.
+ The class is owned by the web engine and does not need to be deleted. However, the web engine
+ may delete the job when it is no longer needed, and therefore the signal QObject::destroyed()
+ must be monitored if a pointer to the object is stored.
\inmodule QtWebEngineCore
*/
/*!
+ \enum QWebEngineUrlRequestJob::Error
+
+ This enum type holds the type of the error that occurred:
+
+ \value NoError
+ The request was successful.
+ \value UrlNotFound
+ The requested URL was not found.
+ \value UrlInvalid
+ The requested URL is invalid.
+ \value RequestAborted
+ The request was canceled.
+ \value RequestDenied
+ The request was denied.
+ \value RequestFailed
+ The request failed.
+*/
+
+/*!
\internal
*/
QWebEngineUrlRequestJob::QWebEngineUrlRequestJob(URLRequestCustomJobDelegate * p)
@@ -92,7 +110,7 @@ QByteArray QWebEngineUrlRequestJob::requestMethod() const
}
/*!
- Replies the request with \a device with the mime-type \a contentType.
+ Replies to the request with \a device and the MIME type \a contentType.
*/
void QWebEngineUrlRequestJob::reply(const QByteArray &contentType, QIODevice *device)
{
@@ -100,7 +118,9 @@ void QWebEngineUrlRequestJob::reply(const QByteArray &contentType, QIODevice *de
}
/*!
- Fails the request with error \a error.
+ Fails the request with the error \a r.
+
+ \sa Error
*/
void QWebEngineUrlRequestJob::fail(Error r)
{
@@ -108,7 +128,7 @@ void QWebEngineUrlRequestJob::fail(Error r)
}
/*!
- Tell the request is redirected to \a url.
+ Redirects the request to \a url.
*/
void QWebEngineUrlRequestJob::redirect(const QUrl &url)
{