diff options
Diffstat (limited to 'src/webtab')
-rw-r--r-- | src/webtab/protocolhandler.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/webtab/protocolhandler.cpp b/src/webtab/protocolhandler.cpp index e9f6a77c..4b456112 100644 --- a/src/webtab/protocolhandler.cpp +++ b/src/webtab/protocolhandler.cpp @@ -31,7 +31,10 @@ #include "rekonq.h" // Local Includes +#include "application.h" + #include "historymanager.h" + #include "webpage.h" #include "webtab.h" #include "urlbar.h" @@ -142,6 +145,26 @@ bool ProtocolHandler::preHandling(const QNetworkRequest &request, QWebFrame *fra return false; } + kDebug() << "FN: " << _url.fileName(); + kDebug() << "DIR: " << _url.directory(); + + if (_url.directory() == QL1S("webapp")) + { + if (_url.fileName() == QL1S("launch")) + { + QString value = _url.queryItemValue(QL1S("url")); + rApp->loadUrl(KUrl(value), Rekonq::WebApp); + return true; + } + if (_url.fileName() == QL1S("install")) + { + QString urlValue = _url.queryItemValue(QL1S("url")); + QString titleValue = _url.queryItemValue(QL1S("title")); + rApp->createWebAppShortcut(urlValue, titleValue); + return true; + } + } + if (encodedUrl == QByteArray("about:home")) { switch (ReKonfig::newTabStartPage()) |