summaryrefslogtreecommitdiffstats
path: root/src/libs/kdtools/filedownloader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/kdtools/filedownloader.cpp')
-rw-r--r--src/libs/kdtools/filedownloader.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libs/kdtools/filedownloader.cpp b/src/libs/kdtools/filedownloader.cpp
index ca50e26d9..fb3d2677e 100644
--- a/src/libs/kdtools/filedownloader.cpp
+++ b/src/libs/kdtools/filedownloader.cpp
@@ -812,9 +812,9 @@ void KDUpdater::LocalFileDownloader::doDownload()
QString localFile = this->url().toLocalFile();
d->source = new QFile(localFile, this);
if (!d->source->open(QFile::ReadOnly)) {
- onError();
setDownloadAborted(tr("Cannot open file \"%1\" for reading: %2").arg(QFileInfo(localFile)
- .fileName(), d->source ? d->source->errorString() : tr("File not found")));
+ .fileName(), d->source->errorString()));
+ onError();
return;
}
@@ -828,9 +828,9 @@ void KDUpdater::LocalFileDownloader::doDownload()
}
if (!d->destination->isOpen()) {
- onError();
setDownloadAborted(tr("Cannot open file \"%1\" for writing: %2")
.arg(QFileInfo(d->destination->fileName()).fileName(), d->destination->errorString()));
+ onError();
return;
}
@@ -901,10 +901,10 @@ void KDUpdater::LocalFileDownloader::timerEvent(QTimerEvent *event)
if (numWritten < 0) {
killTimer(d->timerId);
d->timerId = -1;
- onError();
setDownloadAborted(tr("Writing to file \"%1\" failed: %2").arg(
QDir::toNativeSeparators(d->destination->fileName()),
d->destination->errorString()));
+ onError();
return;
}
toWrite -= numWritten;
@@ -1089,11 +1089,11 @@ void KDUpdater::ResourceFileDownloader::timerEvent(QTimerEvent *event)
{
if (event->timerId() == d->timerId) {
if (!d->destFile.isOpen()) {
- onError();
killTimer(d->timerId);
emit downloadProgress(1);
setDownloadAborted(tr("Cannot read resource file \"%1\": %2").arg(downloadedFileName(),
d->destFile.errorString()));
+ onError();
return;
}