From b66815cf34030ce5d57935eeaaac732ca69e2a78 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 4 Jul 2012 18:46:58 +0200 Subject: break an eventual "recall" loop This is needed in case rekonq has been associated with something it cannot properly handle BUG: 299056 --- src/protocolhandler.cpp | 2 ++ src/webpage.cpp | 13 +++++++++++++ 2 files changed, 15 insertions(+) (limited to 'src') diff --git a/src/protocolhandler.cpp b/src/protocolhandler.cpp index 7b6c9318..186b93d3 100644 --- a/src/protocolhandler.cpp +++ b/src/protocolhandler.cpp @@ -238,6 +238,8 @@ bool ProtocolHandler::postHandling(const QNetworkRequest &request, QWebFrame *fr return true; } + + return false; } // we cannot handle this protocol in any way. diff --git a/src/webpage.cpp b/src/webpage.cpp index b4f6e03d..c028ee58 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -368,6 +368,19 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply) return; } + // NOTE + // This is needed in case rekonq has been associated with something it cannot + // properly handle (eg: xbel files, see BUG:299056). This way we break an eventual + // "recall" loop. + if (appService->exec().trimmed().startsWith() == QL1S("rekonq")) + { + isLocal + ? KMessageBox::sorry(view(), i18n("rekonq cannot properly handle this, sorry")) + : downloadUrl(reply->url()); + + return; + } + if (isLocal) { // Load outside local files -- cgit v1.2.1