diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2012-03-09 17:35:45 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2012-03-09 17:35:45 +0100 |
commit | 3210a9057d5bf2fb7e522055d08994fac8e61b57 (patch) | |
tree | 32fe5bb9c27f29f69a110d5bb047121fad21c9e1 | |
parent | Include Tab History when Cloning a Tab (diff) | |
download | rekonq-3210a9057d5bf2fb7e522055d08994fac8e61b57.tar.xz |
Let rekonq load urls on new tabs on sites checking the referer ;)
-rw-r--r-- | src/webview.cpp | 16 |
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); } |