diff options
Diffstat (limited to 'src/mainview.cpp')
-rw-r--r-- | src/mainview.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp index 7a7b36b3..ed09def9 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -623,9 +623,19 @@ void MainView::aboutToShowRecentTriggeredAction(QAction *action) void MainView::loadUrlInCurrentTab(const KUrl &url) { WebView *webView = currentWebView(); + + KUrl loadingUrl(url); + + if (loadingUrl.isRelative()) + { + QString fn = loadingUrl.url(KUrl::RemoveTrailingSlash); + loadingUrl.setUrl("//" + fn); + loadingUrl.setScheme("http"); + } + if (webView) { - webView->loadUrl(url); + webView->load(loadingUrl); webView->setFocus(); } } |