summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/application.cpp27
-rw-r--r--src/webview.cpp4
2 files changed, 14 insertions, 17 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 );
diff --git a/src/webview.cpp b/src/webview.cpp
index a8a45077..51874627 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -164,7 +164,7 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
QStringList favoriteEngines;
favoriteEngines << "wikipedia" << "google"; //defaults
favoriteEngines = cg.readEntry("FavoriteSearchEngines", favoriteEngines);
- const char keywordDelimiter = cg.readEntry("KeywordDelimiter", static_cast<int>(':'));
+ QString keywordDelimiter = cg.readEntry("KeywordDelimiter", ":");
KService::Ptr service;
KUriFilterData data;
foreach (QString engine, favoriteEngines)
@@ -208,7 +208,7 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
QStringList favoriteEngines;
favoriteEngines << "wikipedia" << "google"; //defaults
favoriteEngines = cg.readEntry("FavoriteSearchEngines", favoriteEngines);
- const char keywordDelimiter = cg.readEntry("KeywordDelimiter", static_cast<int>(':'));
+ QString keywordDelimiter = cg.readEntry("KeywordDelimiter", ":");
KService::Ptr service;
KUriFilterData data;
foreach (QString engine, favoriteEngines)