diff options
author | kh1 <karsten.heimrich@nokia.com> | 2011-10-19 15:13:08 +0200 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@nokia.com> | 2011-10-20 15:49:52 +0200 |
commit | e942918cdd6ca268d3613d6dbf5abb6ca97d58a9 (patch) | |
tree | c0b03c314f5dac378567dc0a8bcda57fc4b63b03 /installerbuilder | |
parent | 5ab60a3bda45d8fb95fa98bb8afea280fc3ea88d (diff) |
Add some more status information.
Change-Id: Ia4b3a297a65840d5fca35831a5181791c776baa7
Reviewed-by: Niels Weber <niels.2.weber@nokia.com>
Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com>
Reviewed-by: Karsten Heimrich <karsten.heimrich@nokia.com>
Diffstat (limited to 'installerbuilder')
-rw-r--r-- | installerbuilder/libinstaller/3rdparty/kdtools/KDUpdater/kdupdaterfiledownloader.cpp | 20 | ||||
-rw-r--r-- | installerbuilder/libinstaller/3rdparty/kdtools/KDUpdater/kdupdaterfiledownloader.h | 1 |
2 files changed, 15 insertions, 6 deletions
diff --git a/installerbuilder/libinstaller/3rdparty/kdtools/KDUpdater/kdupdaterfiledownloader.cpp b/installerbuilder/libinstaller/3rdparty/kdtools/KDUpdater/kdupdaterfiledownloader.cpp index 39293b4f5..a7a7d0880 100644 --- a/installerbuilder/libinstaller/3rdparty/kdtools/KDUpdater/kdupdaterfiledownloader.cpp +++ b/installerbuilder/libinstaller/3rdparty/kdtools/KDUpdater/kdupdaterfiledownloader.cpp @@ -268,6 +268,7 @@ QString FileDownloader::errorString() const void FileDownloader::setDownloadAborted( const QString& error ) { d->errorString = error; + emit downloadStatus(error); emit downloadAborted( error ); } @@ -288,6 +289,12 @@ void KDUpdater::FileDownloader::setDownloadCompleted( const QString& path ) job.release()->start(); } +void KDUpdater::FileDownloader::setDownloadCanceled() +{ + emit downloadCanceled(); + emit downloadStatus(tr("Download canceled.")); +} + void KDUpdater::FileDownloader::sha1SumVerified( KDUpdater::HashVerificationJob* job ) { if ( job->hasError() ) { @@ -297,6 +304,7 @@ void KDUpdater::FileDownloader::sha1SumVerified( KDUpdater::HashVerificationJob* else { onSuccess(); emit downloadCompleted(); + emit downloadStatus(tr("Download finished.")); } } @@ -577,7 +585,7 @@ void KDUpdater::LocalFileDownloader::cancelDownload() d->timerId = -1; onError(); - emit downloadCanceled(); + setDownloadCanceled(); } void KDUpdater::LocalFileDownloader::timerEvent(QTimerEvent *event) @@ -731,7 +739,7 @@ void KDUpdater::ResourceFileDownloader::cancelDownload() killTimer( d->timerId ); d->timerId = -1; - emit downloadCanceled(); + setDownloadCanceled(); } void KDUpdater::ResourceFileDownloader::timerEvent(QTimerEvent*) @@ -851,7 +859,7 @@ void KDUpdater::FtpDownloader::ftpDone(bool error) if( d->aborted ) { d->aborted = false; - emit downloadCanceled(); + setDownloadCanceled(); } else setDownloadAborted( d->ftp->errorString() ); @@ -1120,7 +1128,7 @@ void KDUpdater::HttpDownloader::httpDone( bool error ) if( d->aborted ) { d->aborted = false; - emit downloadCanceled(); + setDownloadCanceled(); } else setDownloadAborted( err ); @@ -1341,7 +1349,7 @@ void SignatureVerificationDownloader::dataDownloadAborted( const QString& err ) void SignatureVerificationDownloader::dataDownloadCanceled() { - emit downloadCanceled(); + setDownloadCanceled(); } static QUrl suggestSignatureUrl( const QUrl& url ) { @@ -1375,7 +1383,7 @@ void SignatureVerificationDownloader::signatureDownloadAborted( const QString& e void SignatureVerificationDownloader::signatureDownloadCanceled() { - emit downloadCanceled(); + setDownloadCanceled(); } void SignatureVerificationDownloader::signatureDownloadCompleted() diff --git a/installerbuilder/libinstaller/3rdparty/kdtools/KDUpdater/kdupdaterfiledownloader.h b/installerbuilder/libinstaller/3rdparty/kdtools/KDUpdater/kdupdaterfiledownloader.h index c66470588..f30644286 100644 --- a/installerbuilder/libinstaller/3rdparty/kdtools/KDUpdater/kdupdaterfiledownloader.h +++ b/installerbuilder/libinstaller/3rdparty/kdtools/KDUpdater/kdupdaterfiledownloader.h @@ -96,6 +96,7 @@ namespace KDUpdater void downloadAborted(const QString& errorMessage); protected: + void setDownloadCanceled(); void setDownloadCompleted( const QString& filepath ); void setDownloadAborted( const QString& error ); |