diff options
author | Tim Jenssen <tim.jenssen@digia.com> | 2013-03-21 17:04:03 +0100 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@digia.com> | 2013-03-21 17:04:32 +0100 |
commit | 3d9fc71e899702fff6124351cf0d5b1fa0c07b41 (patch) | |
tree | a9b8eb1ca5fd45c7f9ffb4a92588e2fa6a294443 /src/libs/kdtools | |
parent | 7e9b2651d0bba127ab8197ffa1ddbd5805a211d2 (diff) | |
parent | 3fb931187386aadd4329e763b8a276ee0bc5ab77 (diff) |
Merge remote-tracking branch 'origin/1.3'
Change-Id: Ibe38be81d8e763fb58899e2594641b8b062c5504
Diffstat (limited to 'src/libs/kdtools')
-rw-r--r-- | src/libs/kdtools/kdupdaterfiledownloader.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/libs/kdtools/kdupdaterfiledownloader.cpp b/src/libs/kdtools/kdupdaterfiledownloader.cpp index a026fc3c4..9ad3861dd 100644 --- a/src/libs/kdtools/kdupdaterfiledownloader.cpp +++ b/src/libs/kdtools/kdupdaterfiledownloader.cpp @@ -848,10 +848,11 @@ void KDUpdater::HttpDownloader::httpReadyRead() while (written < read) { const qint64 numWritten = d->destination->write(buffer.data() + written, read - written); if (numWritten < 0) { - const QString err = d->destination->errorString(); + const QString error = d->destination->errorString(); + const QString fileName = d->destination->fileName(); d->shutDown(); - setDownloadAborted(tr("Cannot download %1: Writing to temporary file failed: %2") - .arg(url().toString(), err)); + setDownloadAborted(tr("Cannot download %1: Writing to file '%2' failed: %3") + .arg(url().toString(), fileName, error)); return; } written += numWritten; @@ -977,9 +978,11 @@ void KDUpdater::HttpDownloader::startDownload(const QUrl &url) } if (!d->destination->isOpen()) { + const QString error = d->destination->errorString(); + const QString fileName = d->destination->fileName(); d->shutDown(); - setDownloadAborted(tr("Cannot download %1: Could not create temporary file: %2").arg(url.toString(), - d->destination->errorString())); + setDownloadAborted(tr("Cannot download %1: Could not create %2: %3").arg( + url.toString(), fileName, error)); } } |