summaryrefslogtreecommitdiff
path: root/src/protocolhandler.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-10-18 22:58:59 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-10-18 22:58:59 +0200
commitffdb657d43121f0bc7aac423bb022df5a345f331 (patch)
tree92af48091a02ad762e1afecca8ca4e584be29f51 /src/protocolhandler.cpp
parentMerge branch 'master' of git.kde.org:rekonq (diff)
downloadrekonq-ffdb657d43121f0bc7aac423bb022df5a345f331.tar.xz
Protocol handler (trivial) fixes
Diffstat (limited to 'src/protocolhandler.cpp')
-rw-r--r--src/protocolhandler.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/protocolhandler.cpp b/src/protocolhandler.cpp
index 23743acf..5d5667af 100644
--- a/src/protocolhandler.cpp
+++ b/src/protocolhandler.cpp
@@ -77,7 +77,7 @@ bool ProtocolHandler::preHandling(const QNetworkRequest &request, QWebFrame *fra
_frame = frame;
// rekonq can handle http/s browsing easily
- if (_url.protocol() == QL1S("http") || _url.protocol() == QL1S("https") || _url.protocol() == QL1S("file"))
+ if (_url.protocol() == QL1S("http") || _url.protocol() == QL1S("https"))
return false;
// rekonq can handle file & ftp schemes, if you like,,
@@ -158,22 +158,17 @@ bool ProtocolHandler::preHandling(const QNetworkRequest &request, QWebFrame *fra
return true;
}
- //If rekonq cant handle a protocol by itself, it will hand it over to KDE via KRun
+ // If rekonq cannot handle a protocol by itself, it will hand it over to KDE via KRun
if(KProtocolInfo::isKnownProtocol(_url))
{
- new KRun(_url, Application::instance()->mainWindow());
- return true; //No need to delete KRun, it autodeletes itself
- }
- else
- {
- //Error Message, for those protocols even KDE cant handle
- KMessageBox::error( Application::instance()->mainWindow(), i18nc("@info",
- "rekonq can not handle this URL. \
- Please use an appropriate application to open it."));
- return false;
+ new KRun(_url, Application::instance()->mainWindow()); // No need to delete KRun, it autodeletes itself
+ return true;
}
-
+ // Error Message, for those protocols even KDE cannot handle
+ KMessageBox::error(Application::instance()->mainWindow(), i18nc("@info",
+ "rekonq can not handle this URL. \
+ Please use an appropriate application to open it."));
return false;
}