diff options
author | Sky <git@bunnies.cc> | 2013-10-26 02:28:50 +0100 |
---|---|---|
committer | Sky <git@bunnies.cc> | 2013-10-26 02:31:58 +0100 |
commit | 0430a2a38fe3b6a18dc13090c236272fbb85df0b (patch) | |
tree | ec07fae4d522e83297f84e7b76e95b0b322663e6 /logic/net/DownloadJob.cpp | |
parent | ba938dd8e2cf95110624a338a891e8395bc4a1d2 (diff) | |
download | MultiMC-0430a2a38fe3b6a18dc13090c236272fbb85df0b.tar MultiMC-0430a2a38fe3b6a18dc13090c236272fbb85df0b.tar.gz MultiMC-0430a2a38fe3b6a18dc13090c236272fbb85df0b.tar.lz MultiMC-0430a2a38fe3b6a18dc13090c236272fbb85df0b.tar.xz MultiMC-0430a2a38fe3b6a18dc13090c236272fbb85df0b.zip |
Add assets download status to status bar.
Diffstat (limited to 'logic/net/DownloadJob.cpp')
-rw-r--r-- | logic/net/DownloadJob.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/logic/net/DownloadJob.cpp b/logic/net/DownloadJob.cpp index fa3e655e..38716a02 100644 --- a/logic/net/DownloadJob.cpp +++ b/logic/net/DownloadJob.cpp @@ -56,6 +56,8 @@ void DownloadJob::partSucceeded(int index) num_succeeded++; QLOG_INFO() << m_job_name.toLocal8Bit() << "progress:" << num_succeeded << "/" << downloads.size(); + emit filesProgress(num_succeeded, num_failed, downloads.size()); + if (num_failed + num_succeeded == downloads.size()) { if (num_failed) @@ -78,6 +80,7 @@ void DownloadJob::partFailed(int index) { QLOG_ERROR() << "Part" << index << "failed 3 times (" << downloads[index]->m_url << ")"; num_failed++; + emit filesProgress(num_succeeded, num_failed, downloads.size()); if (num_failed + num_succeeded == downloads.size()) { QLOG_ERROR() << m_job_name.toLocal8Bit() << "failed."; |