From 9f3181f0560fb87000c8c0f052418feb6a626a63 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 4 Feb 2012 08:28:30 +0100 Subject: Consider unknown network errors as errors :) --- src/webpage.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/webpage.cpp b/src/webpage.cpp index 89c52e8a..15d6cabf 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -454,14 +454,11 @@ void WebPage::manageNetworkErrors(QNetworkReply *reply) // ignore this.. return; - case QNetworkReply::ContentAccessDenied: // access to remote content denied (similar to HTTP error 401) + // WARNING: This is also typical adblocked element error: IGNORE THIS! + case QNetworkReply::ContentAccessDenied: // access to remote content denied break; case QNetworkReply::UnknownNetworkError: // unknown network-related error detected - // FIXME: DO WE REALLY NEED THIS??? - _protHandler.postHandling(reply->request(), frame); - return; - case QNetworkReply::ConnectionRefusedError: // remote server refused connection case QNetworkReply::HostNotFoundError: // invalid hostname case QNetworkReply::TimeoutError: // connection time out @@ -470,7 +467,7 @@ void WebPage::manageNetworkErrors(QNetworkReply *reply) case QNetworkReply::ContentNotFoundError: // remote content not found on server (similar to HTTP error 404) case QNetworkReply::ProtocolUnknownError: // Unknown protocol case QNetworkReply::ProtocolInvalidOperationError: // requested operation is invalid for this protocol - + default: kDebug() << "ERROR " << reply->error() << ": " << reply->errorString(); if (reply->url() == _loadingUrl) { @@ -489,10 +486,6 @@ void WebPage::manageNetworkErrors(QNetworkReply *reply) } break; - default: - // Nothing to do here.. - break; - } } -- cgit v1.2.1