diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-01-21 02:03:30 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-01-21 02:03:30 +0100 |
commit | 22bc40e17d463ec817a9c9c1f461b4f7990c5450 (patch) | |
tree | 2522f5a9d6394273002e062aaf3631186fb0ffe2 /src/webview.cpp | |
parent | Implemented a new function to download data with KJob technologies.. (diff) | |
download | rekonq-22bc40e17d463ec817a9c9c1f461b4f7990c5450.tar.xz |
Reimplemented download system based on KGet one.
Thanks Lucas ;)
Rekonq now has its one!
Diffstat (limited to 'src/webview.cpp')
-rw-r--r-- | src/webview.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/webview.cpp b/src/webview.cpp index c7202fd8..436db54e 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -124,7 +124,10 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply) { if (reply->error() == QNetworkReply::NoError) { - BrowserApplication::instance()->downloadUrl( reply->url() ); + KUrl srcUrl = reply->url(); + QString path = ReKonfig::downloadDir() + QString("/") + srcUrl.fileName(); + KUrl destUrl = KUrl(path); + BrowserApplication::instance()->downloadUrl( srcUrl, destUrl ); return; } @@ -305,7 +308,10 @@ void WebView::setStatusBarText(const QString &string) void WebView::downloadRequested(const QNetworkRequest &request) { - BrowserApplication::instance()->downloadUrl( request.url() ); + KUrl srcUrl = request.url(); + QString path = ReKonfig::downloadDir() + QString("/") + srcUrl.fileName(); + KUrl destUrl = KUrl(path); + BrowserApplication::instance()->downloadUrl( srcUrl, destUrl ); } |