diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2011-06-28 00:26:09 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2011-06-28 00:26:09 +0200 |
commit | b00a30c73a0b1301f2a9745014f07cf28220ee16 (patch) | |
tree | efaac8536c86e1fadf1fa0bcc977770b8e3de3c7 /src/protocolhandler.cpp | |
parent | Merge branch 'SC7_DEPS' (diff) | |
download | rekonq-b00a30c73a0b1301f2a9745014f07cf28220ee16.tar.xz |
This should fix "border" protocols handling like apt.
And it should also be a nice semplification :)
Diffstat (limited to 'src/protocolhandler.cpp')
-rw-r--r-- | src/protocolhandler.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/protocolhandler.cpp b/src/protocolhandler.cpp index 945f5b48..c5e0ef96 100644 --- a/src/protocolhandler.cpp +++ b/src/protocolhandler.cpp @@ -190,7 +190,7 @@ bool ProtocolHandler::postHandling(const QNetworkRequest &request, QWebFrame *fr _frame = frame; kDebug() << "URL PROTOCOL: " << _url; - + // "http(s)" (fast) handling if (_url.protocol() == QL1S("http") || _url.protocol() == QL1S("https")) return false; @@ -228,6 +228,15 @@ bool ProtocolHandler::postHandling(const QNetworkRequest &request, QWebFrame *fr } } + // we cannot handle this protocol in any way. + // Try KRunning it... + if (KProtocolInfo::isKnownProtocol(_url)) + { + kDebug() << "WARNING: launching a new app..."; + (void)new KRun(_url, rApp->mainWindow(), 0, _url.isLocalFile()); + return true; + } + return false; } |