Rename QWebNetworkJob::request() into QWebNetworkJob::httpHeader() and added
[WebKit-https.git] / WebKitQt / Api / qwebnetworkinterface.cpp
index b18095006daa8e92cd8113ae208d84781dc0c737..09bd47376e44daf386dbf0b0c10476e42a0ff8bb 100644 (file)
@@ -121,6 +121,11 @@ QWebNetworkRequest &QWebNetworkRequest::operator=(const QWebNetworkRequest &othe
     return *this;
 }
 
+QWebNetworkRequest::QWebNetworkRequest(QWebNetworkRequestPrivate *priv)
+    : d(new QWebNetworkRequestPrivate(*priv))
+{
+}
+
 QWebNetworkRequest::~QWebNetworkRequest()
 {
     delete d;
@@ -210,11 +215,19 @@ QByteArray QWebNetworkJob::postData() const
 /*!
   The HTTP request header that should be used to download the job.
 */
-QHttpRequestHeader QWebNetworkJob::request() const
+QHttpRequestHeader QWebNetworkJob::httpHeader() const
 {
     return d->request.httpHeader;
 }
 
+/*!
+  The complete network request that should be used to download the job.
+*/
+QWebNetworkRequest QWebNetworkJob::request() const
+{
+    return QWebNetworkRequest(&d->request);
+}
+
 /*!
   The HTTP response header received from the network.
 */
@@ -733,7 +746,7 @@ WebCoreHttp::~WebCoreHttp()
 void WebCoreHttp::request(QWebNetworkJob *job)
 {
     DEBUG() << ">>>>>>>>>>>>>> WebCoreHttp::request";
-    DEBUG() << job->request().toString() << "\n";
+    DEBUG() << job->httpHeader().toString() << "\n";
     m_pendingRequests.append(job);
 
     scheduleNextRequest();
@@ -763,9 +776,9 @@ void WebCoreHttp::scheduleNextRequest()
     QHttp *http = connection[c].http;
     QByteArray postData = job->postData();
     if (!postData.isEmpty())
-        http->request(job->request(), postData);
+        http->request(job->httpHeader(), postData);
     else
-        http->request(job->request());
+        http->request(job->httpHeader());
     connection[c].current = job;
 
     DEBUG() << "WebCoreHttp::scheduleNextRequest: using connection" << c;