summaryrefslogtreecommitdiff
path: root/src/webview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/webview.cpp')
-rw-r--r--src/webview.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/webview.cpp b/src/webview.cpp
index b592335c..f8f44b6a 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -104,6 +104,25 @@ WebView::~WebView()
}
+void WebView::load (const QUrl &url)
+{
+ load(QNetworkRequest(url));
+}
+
+
+void WebView::load (const QNetworkRequest &req, QNetworkAccessManager::Operation op, const QByteArray &body)
+{
+ QNetworkRequest request = req;
+ const QUrl &reqUrl = request.url();
+ if (reqUrl.host() == url().host())
+ {
+ request.setRawHeader(QByteArray("Referer"), url().toEncoded());
+ }
+
+ KWebView::load(request, op, body);
+}
+
+
void WebView::loadStarted()
{
hideAccessKeys();