summaryrefslogtreecommitdiff
path: root/src/mainview.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-04-29 01:11:58 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-04-29 01:11:58 +0200
commit7a35bdc75a549a617bb3d8440a9a96f551bc26a2 (patch)
tree1d9d67382c0d3a6fa7f91c8a0366df8e944bbd48 /src/mainview.cpp
parentRemoved unused Application loadUrl method (diff)
downloadrekonq-7a35bdc75a549a617bb3d8440a9a96f551bc26a2.tar.xz
mainview loadurlinCurrentTab improvements
Diffstat (limited to 'src/mainview.cpp')
-rw-r--r--src/mainview.cpp12
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();
}
}