summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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);