summaryrefslogtreecommitdiff
path: root/src/networkaccessmanager.cpp
diff options
context:
space:
mode:
authorJon Ander Peñalba <jonan88@gmail.com>2010-09-02 18:10:46 +0200
committerJon Ander Peñalba <jonan88@gmail.com>2010-09-03 08:27:20 +0200
commitd0ab264b8aa5f5c7fcb21dd172a1f3f5b777356b (patch)
treef89adefce79c8bf0d5cde2e1bc015a443ccb39fe /src/networkaccessmanager.cpp
parentThis commit hacks a merge request, to fast fixing a crash calling the bk toolbar (diff)
downloadrekonq-d0ab264b8aa5f5c7fcb21dd172a1f3f5b777356b.tar.xz
Include clean-up in the big src directory
Diffstat (limited to 'src/networkaccessmanager.cpp')
-rw-r--r--src/networkaccessmanager.cpp22
1 files changed, 9 insertions, 13 deletions
diff --git a/src/networkaccessmanager.cpp b/src/networkaccessmanager.cpp
index 73c8b599..37ddcacc 100644
--- a/src/networkaccessmanager.cpp
+++ b/src/networkaccessmanager.cpp
@@ -28,20 +28,16 @@
// Self Includes
#include "networkaccessmanager.h"
-#include "networkaccessmanager.moc"
// Local Includes
-#include "application.h"
#include "adblockmanager.h"
+#include "application.h"
#include "webpage.h"
// KDE Includes
#include <KLocale>
#include <KProtocolManager>
-// Qt Includes
-#include <QtNetwork/QNetworkReply>
-
NetworkAccessManager::NetworkAccessManager(QObject *parent)
: AccessManager(parent)
@@ -65,7 +61,7 @@ QNetworkReply *NetworkAccessManager::createRequest(QNetworkAccessManager::Operat
QNetworkRequest req = request;
req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true);
req.setRawHeader("Accept-Language", _acceptLanguage);
-
+
KIO::CacheControl cc = KProtocolManager::cacheControl();
switch (cc)
{
@@ -88,20 +84,20 @@ QNetworkReply *NetworkAccessManager::createRequest(QNetworkAccessManager::Operat
break;
}
- // WARNING
- // There are actually 3 exceptions here handled with QNAM
+ // WARNING
+ // There are actually 3 exceptions here handled with QNAM
// instead of KIO that need fixes upstream before removing. They are:
// 1) AJAX requests handling
// 2) DeleteOperation
// 3) CustomOperation
-
+
// this is used to handle "AJAX" requests
QByteArray header = req.rawHeader("x-requested-with");
if(!header.isNull())
{
return QNetworkAccessManager::createRequest(op, req, outgoingData);
}
-
+
switch(op)
{
case QNetworkAccessManager::HeadOperation:
@@ -110,13 +106,13 @@ QNetworkReply *NetworkAccessManager::createRequest(QNetworkAccessManager::Operat
case QNetworkAccessManager::GetOperation:
reply = Application::adblockManager()->block(req, parentPage);
break;
-
+
case QNetworkAccessManager::PutOperation:
break;
case QNetworkAccessManager::PostOperation:
break;
-
+
case QNetworkAccessManager::DeleteOperation:
kDebug() << "DELETE OPERATION...";
reply = QNetworkAccessManager::createRequest(op, req, outgoingData);
@@ -140,7 +136,7 @@ QNetworkReply *NetworkAccessManager::createRequest(QNetworkAccessManager::Operat
reply = AccessManager::createRequest(op, req, outgoingData);
if(parentPage && parentPage->hasNetworkAnalyzerEnabled())
- emit networkData( op, req, reply );
+ emit networkData( op, req, reply );
return reply;
}