From c50290e8fdbce0e7736a717cf44c8ab8b062fe77 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 12 Nov 2009 15:35:05 +0100 Subject: KIO download system ported to kdewebkit signals and functions --- src/webview.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/webview.cpp') diff --git a/src/webview.cpp b/src/webview.cpp index 2c96f532..f38d363e 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -66,6 +66,9 @@ WebView::WebView(QWidget* parent) connect(this, SIGNAL(loadFinished(bool)), this, SLOT(loadFinished(bool))); connect(this, SIGNAL(linkMiddleOrCtrlClicked(const KUrl &)), this, SLOT(loadInNewTab(const KUrl &)) ); + + connect(this, SIGNAL(linkShiftClicked(const KUrl &)), this, SLOT(downloadRequest(const KUrl &))); + connect(page(), SIGNAL(downloadRequested(const QNetworkRequest &)), this, SLOT(downloadRequest(const QNetworkRequest &r))); } @@ -427,4 +430,15 @@ void WebView::loadInNewTab(const KUrl &url) { Application::instance()->loadUrl(url, Rekonq::NewCurrentTab); } - \ No newline at end of file + + +void WebView::downloadRequest(const KUrl &url) +{ + m_page->downloadRequest(QNetworkRequest(url)); +} + + +void WebView::downloadRequest(const QNetworkRequest &request) +{ + m_page->downloadRequest(request); +} -- cgit v1.2.1