diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-05-05 15:46:28 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-05-05 15:46:28 +0200 |
commit | 1830a45a0e1ae8f257667899a6c34f32545dbd62 (patch) | |
tree | c5a94ad37b50c484c7434e6dde01b1ece43672e4 /src/networkaccessmanager.cpp | |
parent | if the url of an item have the same domaine name as the typed string, it is m... (diff) | |
download | rekonq-1830a45a0e1ae8f257667899a6c34f32545dbd62.tar.xz |
This commit implements another dockwidget for rekonq, containing a
network analyzer.
Its code is based on previous implementation of Web Inspector Dock
and on Richmoore example about QNAM proxy.
Many thanks for :)
Diffstat (limited to 'src/networkaccessmanager.cpp')
-rw-r--r-- | src/networkaccessmanager.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/networkaccessmanager.cpp b/src/networkaccessmanager.cpp index 765604dc..e1d2e6eb 100644 --- a/src/networkaccessmanager.cpp +++ b/src/networkaccessmanager.cpp @@ -39,6 +39,9 @@ #include <KLocale> #include <KProtocolManager> +// Qt Includes +#include <QtNetwork/QNetworkReply> + NetworkAccessManager::NetworkAccessManager(QObject *parent) : AccessManager(parent) @@ -53,7 +56,7 @@ NetworkAccessManager::NetworkAccessManager(QObject *parent) } -QNetworkReply *NetworkAccessManager::createRequest(Operation op, const QNetworkRequest &request, QIODevice *outgoingData) +QNetworkReply *NetworkAccessManager::createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice *outgoingData) { WebPage *parentPage = qobject_cast<WebPage *>(parent()); @@ -89,9 +92,13 @@ QNetworkReply *NetworkAccessManager::createRequest(Operation op, const QNetworkR if (op == QNetworkAccessManager::GetOperation) { reply = Application::adblockManager()->block(req, parentPage); - if (reply) - return reply; } - return AccessManager::createRequest(op, req, outgoingData); + if(!reply) + reply = AccessManager::createRequest(op, req, outgoingData); + + if(parentPage->hasNetworkAnalyzerEnabled()) + emit networkData( op, req, reply ); + + return reply; } |