diff options
author | Lionel Chauvin <megabigbug@yahoo.fr> | 2009-08-10 23:31:11 +0200 |
---|---|---|
committer | Lionel Chauvin <megabigbug@yahoo.fr> | 2009-08-10 23:31:11 +0200 |
commit | c04747a9490d39e97c7800a8b19fda40654970f3 (patch) | |
tree | 19afa48b70d24bbbd60ba7d53d98f95ee93b3929 /src/webpage.cpp | |
parent | better handle network errors (diff) | |
download | rekonq-c04747a9490d39e97c7800a8b19fda40654970f3.tar.xz |
prevent icon loading when error page
Diffstat (limited to 'src/webpage.cpp')
-rw-r--r-- | src/webpage.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/webpage.cpp b/src/webpage.cpp index 6dd3286c..c91b9471 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -72,6 +72,7 @@ WebPage::WebPage(QObject *parent) : QWebPage(parent) , m_keyboardModifiers(Qt::NoModifier) , m_pressedButtons(Qt::NoButton) + , m_requestedUrl("") { setForwardUnsupportedContent(true); @@ -85,6 +86,8 @@ WebPage::WebPage(QObject *parent) bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type) { + m_requestedUrl = request.url(); + if (m_keyboardModifiers & Qt::ControlModifier || m_pressedButtons == Qt::MidButton) { Application::instance()->loadUrl(request.url(), Rekonq::SettingOpenTab); @@ -155,6 +158,9 @@ void WebPage::slotHandleUnsupportedContent(QNetworkReply *reply) void WebPage::manageNetworkErrors(QNetworkReply* reply) { + if (reply->url() != m_requestedUrl) //prevent favicon loading + return; + switch (reply->error()) { case QNetworkReply::NoError: |