Rename QWebNetworkJob::request() into QWebNetworkJob::httpHeader() and added
authorhausmann <hausmann@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Jun 2007 13:03:45 +0000 (13:03 +0000)
committerhausmann <hausmann@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Jun 2007 13:03:45 +0000 (13:03 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@23491 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKitQt/Api/qwebnetworkinterface.cpp
WebKitQt/Api/qwebnetworkinterface.h
WebKitQt/ChangeLog

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;
index ad649442e2bc6da9120fa58805c562a5dc879e4a..8eb2aa836ce90fc67790b1542a30b0c800d5f518 100644 (file)
@@ -56,7 +56,9 @@ public:
     void setPostData(const QByteArray &data);
 
 private:
+    explicit QWebNetworkRequest(QWebNetworkRequestPrivate *priv);
     QWebNetworkRequestPrivate *d;
+    friend class QWebNetworkJob;
 };
 
 class QWEBKIT_EXPORT QWebNetworkJob
@@ -69,7 +71,8 @@ public:
     };
     QUrl url() const;
     QByteArray postData() const;
-    QHttpRequestHeader request() const;
+    QHttpRequestHeader httpHeader() const;
+    QWebNetworkRequest request() const;
 
     QHttpResponseHeader response() const;
     void setResponse(const QHttpResponseHeader &response);
index ae464ac08a2fb1a5ffde9dee968d63b9143d0f85..2adf70cd386fe98842ff294ae1bcf255b2d91489 100644 (file)
@@ -1,3 +1,15 @@
+2007-06-13  Simon Hausmann  <hausmann@kde.org>
+
+        Reviewed by Lars.
+
+        Rename QWebNetworkJob::request() into QWebNetworkJob::httpHeader() and added
+
+        * Api/qwebnetworkinterface.cpp:
+        (QWebNetworkJob::postData):
+        (WebCoreHttp::WebCoreHttp):
+        (WebCoreHttp::scheduleNextRequest):
+        * Api/qwebnetworkinterface.h:
+
 2007-06-13  Simon Hausmann  <hausmann@kde.org>
 
         Reviewed by Lars.