summaryrefslogtreecommitdiff
path: root/src/application.cpp
diff options
context:
space:
mode:
authormegabigbug <megabigbug@arrakis.(none)>2009-07-30 13:55:22 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-08-01 02:11:39 +0200
commitb570fd3c4e56c05d65e21c18c441153bfbe756f4 (patch)
treec11f3a8127025d5e6ff8562b53d17c109ccb545f /src/application.cpp
parentSome comments updated (diff)
downloadrekonq-b570fd3c4e56c05d65e21c18c441153bfbe756f4.tar.xz
fix Webshortcuts, works with space and colon delimiter
Diffstat (limited to 'src/application.cpp')
-rw-r--r--src/application.cpp27
1 files changed, 12 insertions, 15 deletions
diff --git a/src/application.cpp b/src/application.cpp
index ff52d935..60205772 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -262,27 +262,25 @@ void Application::loadUrl(const KUrl& url, const Rekonq::OpenType& type)
KToolInvocation::invokeMailer(url);
return;
}
-
- KUrl loadingUrl(url);
- if (loadingUrl.isRelative())
+ KUrl loadingUrl(url);
+ if (loadingUrl.isRelative() && loadingUrl.path().contains("."))
{
QString fn = loadingUrl.url(KUrl::RemoveTrailingSlash);
- if(loadingUrl.path().contains('.'))
- {
- loadingUrl.setUrl("//" + fn);
- loadingUrl.setScheme("http");
- }
- else
+ loadingUrl.setUrl("//" + fn);
+ loadingUrl.setScheme("http");
+ }
+ else if(loadingUrl.scheme()!="http")
+ {
+ // this should let rekonq to support the beautiful KDE web browsing shortcuts
+ KUriFilterData data(loadingUrl.pathOrUrl());
+ data.setCheckForExecutables (false); //if true, querries like "rekonq" or "dolphin" are considered as executables
+ if (KUriFilter::self()->filterUri(data))
{
- loadingUrl.setUrl(fn);
- loadingUrl.setScheme("gg");
+ loadingUrl = data.uri().url();
}
}
- // this should let rekonq to support the beautiful KDE web browsing shortcuts
- loadingUrl = KUriFilter::self()->filteredUri(loadingUrl);
-
WebView *webView;
switch(type)
@@ -310,7 +308,6 @@ void Application::loadUrl(const KUrl& url, const Rekonq::OpenType& type)
}
}
-
void Application::loadUrl(const QString& urlString, const Rekonq::OpenType& type)
{
return loadUrl( guessUrlFromString(urlString), type );