summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-09-24 18:50:24 +0200
committerAndrea Diamantini <adjam7@gmail.com>2012-12-10 02:48:05 +0100
commit08eea230d1a21432a73cac41ebabd92760c2c3f0 (patch)
tree2dcf61a740d1ee272234fd56659a05b65038eac0
parentChusslove commit about strings (diff)
downloadrekonq-08eea230d1a21432a73cac41ebabd92760c2c3f0.tar.xz
Don't overwrite downloads by default
-rw-r--r--src/download/downloadmanager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/download/downloadmanager.cpp b/src/download/downloadmanager.cpp
index 151858d2..560ddb9d 100644
--- a/src/download/downloadmanager.cpp
+++ b/src/download/downloadmanager.cpp
@@ -263,14 +263,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);
return true;