diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-03-14 00:18:00 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-03-14 00:18:00 +0100 |
commit | 8217910b1bee1aeb826257be86f9e1010b6f9443 (patch) | |
tree | 703051688a661d31cff3a353638f970581f81835 | |
parent | rekonq 0.4.51 (diff) | |
download | rekonq-8217910b1bee1aeb826257be86f9e1010b6f9443.tar.xz |
Changed createRequest method for KIO debugging purposes..
-rw-r--r-- | src/networkaccessmanager.cpp | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/src/networkaccessmanager.cpp b/src/networkaccessmanager.cpp index e6dd6d85..77597cef 100644 --- a/src/networkaccessmanager.cpp +++ b/src/networkaccessmanager.cpp @@ -42,12 +42,41 @@ NetworkAccessManager::NetworkAccessManager(QObject *parent) QNetworkReply *NetworkAccessManager::createRequest(Operation op, const QNetworkRequest &req, QIODevice *outgoingData) { - // Adblock - if (op == QNetworkAccessManager::GetOperation) + QNetworkReply *reply = 0; + + switch(op) { - QNetworkReply *reply = Application::adblockManager()->block(req); + case QNetworkAccessManager::HeadOperation: + kDebug() << "HEAD OPERATION"; + if(outgoingData) + { + QByteArray outgoingDataByteArray = outgoingData->peek(1024 * 1024); + kDebug() << outgoingDataByteArray; + } + break; + + case QNetworkAccessManager::GetOperation: + kDebug() << "GET OPERATION"; + reply = Application::adblockManager()->block(req); if (reply) return reply; + break; + + case QNetworkAccessManager::PutOperation: + kDebug() << "PUT OPERATION"; + break; + + case QNetworkAccessManager::PostOperation: + kDebug() << "POST OPERATION"; + break; + + case QNetworkAccessManager::DeleteOperation: + kDebug() << "DELETE OPERATION"; + break; + + default: + kDebug() << "UNKNOWN OPERATION"; + break; } return AccessManager::createRequest(op,req,outgoingData); |