diff options
author | Michael Bruning <michael.bruning@theqtcompany.com> | 2015-11-24 17:41:17 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2015-12-02 13:29:09 +0000 |
commit | e2e61521969932c8b9f1afe13979f21ecf2a5399 (patch) | |
tree | c05bb5f88cbb0247b0371318e0e7c04242ff8aee /src/core/api/qwebengineurlrequestinfo.cpp | |
parent | 0fe73fcbb9e6a81bd3007e62d7031c56af717571 (diff) |
Change QWebEngineUrlRequestInterceptor::interceptRequest to void.
Now uses a flag in QWebEngineUrlRequestInfoPrivate to store if
the interceptor actually changed the request.
Change-Id: Idccbd1c15696e577ee69248e53b75ba6ec1c571c
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/core/api/qwebengineurlrequestinfo.cpp')
-rw-r--r-- | src/core/api/qwebengineurlrequestinfo.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/api/qwebengineurlrequestinfo.cpp b/src/core/api/qwebengineurlrequestinfo.cpp index e8ce65be3..0aab4aa1b 100644 --- a/src/core/api/qwebengineurlrequestinfo.cpp +++ b/src/core/api/qwebengineurlrequestinfo.cpp @@ -126,6 +126,7 @@ QWebEngineUrlRequestInfoPrivate::QWebEngineUrlRequestInfoPrivate(QWebEngineUrlRe , url(u) , firstPartyUrl(fpu) , method(m) + , changed(false) { } @@ -241,6 +242,12 @@ QByteArray QWebEngineUrlRequestInfo::requestMethod() const return d->method; } +bool QWebEngineUrlRequestInfo::changed() const +{ + Q_D(const QWebEngineUrlRequestInfo); + return d->changed; +} + /*! Redirects this request to \a url. It is only possible to redirect requests that do not have payload data, such as GET requests. @@ -249,6 +256,7 @@ QByteArray QWebEngineUrlRequestInfo::requestMethod() const void QWebEngineUrlRequestInfo::redirect(const QUrl &url) { Q_D(QWebEngineUrlRequestInfo); + d->changed = true; d->url = url; } @@ -261,6 +269,7 @@ void QWebEngineUrlRequestInfo::redirect(const QUrl &url) void QWebEngineUrlRequestInfo::block(bool shouldBlock) { Q_D(QWebEngineUrlRequestInfo); + d->changed = true; d->shouldBlockRequest = shouldBlock; } @@ -271,6 +280,7 @@ void QWebEngineUrlRequestInfo::block(bool shouldBlock) void QWebEngineUrlRequestInfo::setExtraHeader(const QByteArray &name, const QByteArray &value) { Q_D(QWebEngineUrlRequestInfo); + d->changed = true; d->extraHeaders.insert(name, value); } |