summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/protocolhandler.cpp17
-rw-r--r--src/urlbar/urlresolver.cpp2
2 files changed, 18 insertions, 1 deletions
diff --git a/src/protocolhandler.cpp b/src/protocolhandler.cpp
index 568aa400..1f84b420 100644
--- a/src/protocolhandler.cpp
+++ b/src/protocolhandler.cpp
@@ -53,6 +53,7 @@
#include <KJob>
#include <kio/udsentry.h>
#include <KMessageBox>
+#include <kprocess.h>
// Qt Includes
#include <QLatin1String>
@@ -118,6 +119,22 @@ bool ProtocolHandler::preHandling(const QNetworkRequest &request, QWebFrame *fra
return true;
}
+ // "apturl" handling
+ if (_url.protocol() == QL1S ("apt"))
+ {
+ //Declare apturl as QString
+ QString apturl="apturl";
+ //We need to convert the url to QStringList to pass as a argument to apturl
+ QStringList host;
+ host << _url.url();
+
+ if ( KProcess::execute (apturl,host)==0)
+ return true;
+ else
+ return false;
+
+ }
+
// "abp" handling
if (_url.protocol() == QL1S("abp"))
{
diff --git a/src/urlbar/urlresolver.cpp b/src/urlbar/urlresolver.cpp
index 1f4f9f9c..d457e1fb 100644
--- a/src/urlbar/urlresolver.cpp
+++ b/src/urlbar/urlresolver.cpp
@@ -68,7 +68,7 @@ UrlResolver::UrlResolver(const QString &typedUrl)
{
kDebug() << "browse regexp empty. Setting value..";
- QString protocol = "^(http://|https://|file://|ftp://|man:|info:)";
+ QString protocol = "^(http://|https://|file://|ftp://|man:|info:|apt:)";
QString localhost = "^localhost";