From 504311e2a45c18e08865269985f00f7f3f3e6e8a Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 20 Jan 2009 19:03:00 +0100 Subject: Implemented a new function to download data with KJob technologies.. It's not working. For now. But we are nearing the goal.. --- src/webview.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/webview.cpp') diff --git a/src/webview.cpp b/src/webview.cpp index adfeab97..c7202fd8 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -30,13 +30,11 @@ #include "mainwindow.h" #include "mainview.h" #include "cookiejar.h" -#include "downloadmanager.h" #include "networkaccessmanager.h" // KDE Includes #include #include -#include // Qt Includes #include @@ -126,7 +124,7 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply) { if (reply->error() == QNetworkReply::NoError) { - BrowserApplication::downloadManager()->handleUnsupportedContent(reply); + BrowserApplication::instance()->downloadUrl( reply->url() ); return; } @@ -305,12 +303,9 @@ void WebView::setStatusBarText(const QString &string) } -// FIXME: use KIO transfer job instead!! void WebView::downloadRequested(const QNetworkRequest &request) { - const KUrl url = KUrl( request.url() ); - QString path = ReKonfig::downloadDir() + QString("/") + url.fileName(); - KIO::NetAccess::download( url , path , this ); + BrowserApplication::instance()->downloadUrl( request.url() ); } -- cgit v1.2.1