diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/analyzer/networkanalyzer.cpp | 13 | ||||
-rw-r--r-- | src/networkaccessmanager.cpp | 31 |
2 files changed, 39 insertions, 5 deletions
diff --git a/src/analyzer/networkanalyzer.cpp b/src/analyzer/networkanalyzer.cpp index 1cf45e66..c5b08835 100644 --- a/src/analyzer/networkanalyzer.cpp +++ b/src/analyzer/networkanalyzer.cpp @@ -79,18 +79,25 @@ void NetworkAnalyzer::addRequest( QNetworkAccessManager::Operation op, const QNe QStringList cols; switch( op ) { - case QNetworkAccessManager::HeadOperation: + case QNetworkAccessManager::HeadOperation: cols << QL1S("HEAD"); break; case QNetworkAccessManager::GetOperation: cols << QL1S("GET"); break; - case QNetworkAccessManager::PutOperation: + case QNetworkAccessManager::PutOperation: cols << QL1S("PUT"); break; - case QNetworkAccessManager::PostOperation: + case QNetworkAccessManager::PostOperation: cols << QL1S("POST"); break; + case QNetworkAccessManager::DeleteOperation: + cols << QL1S("DELETE"); + break; + case QNetworkAccessManager::CustomOperation: + cols << QL1S("CUSTOM"); + break; + default: kDebug() << "Unknown network operation"; } diff --git a/src/networkaccessmanager.cpp b/src/networkaccessmanager.cpp index 4aa2488a..9d9d052d 100644 --- a/src/networkaccessmanager.cpp +++ b/src/networkaccessmanager.cpp @@ -88,10 +88,37 @@ QNetworkReply *NetworkAccessManager::createRequest(QNetworkAccessManager::Operat break; } - - if (op == QNetworkAccessManager::GetOperation) + switch(op) { + case QNetworkAccessManager::HeadOperation: + break; + + case QNetworkAccessManager::GetOperation: reply = Application::adblockManager()->block(req, parentPage); + break; + + case QNetworkAccessManager::PutOperation: + break; + + case QNetworkAccessManager::PostOperation: + break; + + case QNetworkAccessManager::DeleteOperation: + break; + + case QNetworkAccessManager::CustomOperation: +/* { + kDebug() << "CUSTOM OPERATION..."; + QByteArray verb("*"); + reply = sendCustomRequest(req, verb, outgoingData); + } + if(!reply) + kDebug() << "OOOOOOOOOOOOOOOOOOO CUSTOM REPLY NULL";*/ + break; + + default: + kDebug() << "NON EXTANT CASE..."; + break; } if(!reply) |