summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-09-24 18:47:58 +0200
committerAndrea Diamantini <adjam7@gmail.com>2012-09-24 18:47:58 +0200
commit6cdee879ac701e210bbdc0d3b41704706ff2c098 (patch)
treefe56ea58d7539079c3d79932a3ad0881cb4d27eb /src
parenti18n: no string puzzles. (diff)
downloadrekonq-6cdee879ac701e210bbdc0d3b41704706ff2c098.tar.xz
Don't overwrite downloads by default
Diffstat (limited to 'src')
-rw-r--r--src/downloadmanager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp
index 7c31f435..8070ed58 100644
--- a/src/downloadmanager.cpp
+++ b/src/downloadmanager.cpp
@@ -247,14 +247,15 @@ bool DownloadManager::downloadResource(const KUrl &srcUrl, const KIO::MetaData &
return true;
}
- KIO::CopyJob *job = KIO::copy(srcUrl, destUrl, KIO::Overwrite);
+ KIO::CopyJob *job = KIO::copy(srcUrl, destUrl);
if (!metaData.isEmpty())
job->setMetaData(metaData);
job->addMetaData(QL1S("MaxCacheSize"), QL1S("0")); // Don't store in http cache.
job->addMetaData(QL1S("cache"), QL1S("cache")); // Use entry from cache if available.
- job->uiDelegate()->setAutoErrorHandlingEnabled(true);
+ job->ui()->setWindow((parent ? parent->window() : 0));
+ job->ui()->setAutoErrorHandlingEnabled(true);
addDownload(job);
emit notifyDownload(fileName);