From b00a30c73a0b1301f2a9745014f07cf28220ee16 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 28 Jun 2011 00:26:09 +0200 Subject: This should fix "border" protocols handling like apt. And it should also be a nice semplification :) --- src/webpage.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'src/webpage.cpp') diff --git a/src/webpage.cpp b/src/webpage.cpp index 128d2e34..9499d6f7 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -409,17 +409,6 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply) KIO::Integration::AccessManager::putReplyOnHold(reply); - // get reply url... - KUrl replyUrl = reply->url(); - - bool isLocal = replyUrl.isLocalFile(); - if(isLocal && KProtocolInfo::isKnownProtocol(replyUrl)) - { - kDebug() << "WARNING: launching a new app..."; - (void)new KRun(replyUrl, rApp->mainWindow(), 0, replyUrl.isLocalFile()); - return; - } - // Get suggested file name... extractSuggestedFileName(reply, _suggestedFileName); @@ -436,6 +425,9 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply) KService::Ptr appService = KMimeTypeTrader::self()->preferredService(_mimeType); + KUrl replyUrl = reply->url(); + bool isLocal = replyUrl.isLocalFile(); + if (appService.isNull()) // no service can handle this. We can just download it.. { kDebug() << "no service can handle this. We can just download it.."; @@ -519,6 +511,7 @@ void WebPage::loadStarted() { } + void WebPage::loadFinished(bool ok) { Q_UNUSED(ok); -- cgit v1.2.1