Hi
After working for about half an hour on this,i came up with the attached
patch for apturl support in rekonq.It would be nice if this can be
incorporated in the 0.5 release.
Regards
Rohan Garg
www.launchpad.net/~rohangarg
diff --git a/src/protocolhandler.cpp b/src/protocolhandler.cpp
index 568aa40..2b11ce2 100644
--- a/src/protocolhandler.cpp
+++ b/src/protocolhandler.cpp
@@ -53,6 +53,7 @@
#include <KJob>
#include <kio/udsentry.h>
#include <KMessageBox>
+#include <KProcess>
// Qt Includes
#include <QLatin1String>
@@ -81,7 +82,11 @@ bool ProtocolHandler::preHandling(const QNetworkRequest &request, QWebFrame *fra
{
_url = request.url();
_frame = frame;
-
+ //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();
// "http(s)" (fast) handling
if (_url.protocol() == QL1S("http") || _url.protocol() == QL1S("https"))
return false;
@@ -118,6 +123,14 @@ bool ProtocolHandler::preHandling(const QNetworkRequest &request, QWebFrame *fra
return true;
}
+// "apturl" handling
+ if (_url.protocol() == QL1S("apt"))
+ {
+ KProcess::execute(apturl,host);
+ return true;
+
+ }
+
// "abp" handling
if (_url.protocol() == QL1S("abp"))
{
diff --git a/src/urlbar/urlresolver.cpp b/src/urlbar/urlresolver.cpp
index 1f4f9f9..d457e1f 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";
_______________________________________________
rekonq mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/rekonq