summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/webview.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/webview.cpp b/src/webview.cpp
index 019eb42d..ee1ec270 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -894,9 +894,21 @@ void WebView::inspect()
}
-void WebView::loadUrlInNewTab(const KUrl &url)
+void WebView::loadUrlInNewTab(const KUrl &u)
{
- emit loadUrl(url, Rekonq::NewTab);
+ QNetworkRequest req(u);
+ req.setRawHeader(QByteArray("Referer"), url().toEncoded());
+
+ WebTab *w = 0;
+ if (ReKonfig::openLinksInNewWindow())
+ {
+ w = rApp->newMainWindow()->mainView()->currentWebTab();
+ }
+ else
+ {
+ w = rApp->mainWindow()->mainView()->newWebTab(!ReKonfig::openNewTabsInBackground());
+ }
+ w->view()->load(req);
}