Commit 1eac8672 authored by hausmann's avatar hausmann
Browse files

Added a QWebNetworkRequest::init overload that takes a WebCore::ResourceRequest,

to be called from FrameLoaderClientQt in the near future.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@22094 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e8aa9fca
......@@ -56,6 +56,13 @@ static bool operator==(const HostInfo &i1, const HostInfo &i2)
return i1.port == i2.port && i1.host == i2.host;
}
void QWebNetworkRequest::init(const WebCore::ResourceRequest &resourceRequest)
{
KURL url = resourceRequest.url();
QUrl qurl = QString(url.url());
init(resourceRequest.httpMethod(), qurl, &resourceRequest);
}
void QWebNetworkRequest::init(const QString &method, const QUrl &url, const WebCore::ResourceRequest *resourceRequest)
{
request = QHttpRequestHeader(method, url.toEncoded(QUrl::RemoveScheme|QUrl::RemoveAuthority));
......@@ -245,9 +252,7 @@ bool QWebNetworkManager::add(ResourceHandle *handle, QWebNetworkInterface *inter
job->d->interface = interface;
job->d->connector = 0;
KURL url = handle->url();
QUrl qurl = QString(url.url());
job->d->init(handle->method(), qurl, &handle->request());
job->d->init(handle->request());
if (handle->method() != "POST" && handle->method() != "GET") {
// don't know what to do! (probably a request error!!)
......
......@@ -42,6 +42,7 @@ struct QWebNetworkRequest
QHttpRequestHeader request;
QByteArray postData;
void init(const WebCore::ResourceRequest &resourceRequest);
void init(const QString &method, const QUrl &url, const WebCore::ResourceRequest *resourceRequest = 0);
void setURL(const QUrl &u);
};
......
2007-06-11 Simon Hausmann <hausmann@kde.org>
Reviewed by Lars.
Added a QWebNetworkRequest::init overload that takes a WebCore::ResourceRequest,
to be called from FrameLoaderClientQt in the near future.
* Api/qwebnetworkinterface.cpp:
(QWebNetworkManager::add):
* Api/qwebnetworkinterface_p.h:
2007-06-11 Simon Hausmann <hausmann@kde.org>
Reviewed by Lars.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment