summaryrefslogtreecommitdiffstats
path: root/logic/net/NetJob.h
diff options
context:
space:
mode:
authorJan Dalheimer <jan@dalheimer.de>2013-12-16 21:17:50 +0100
committerJan Dalheimer <jan@dalheimer.de>2013-12-16 21:17:50 +0100
commit47bf7fff27665496bc4212bcaccc80350f665f97 (patch)
tree878fd220464c5280fcbe589d3ed738ce0306ab2a /logic/net/NetJob.h
parentae68adc3a536525990b0668703fd74eded8ccfde (diff)
parentdff00a6d2abb84a93e48ff00dda16444550d859f (diff)
downloadMultiMC-47bf7fff27665496bc4212bcaccc80350f665f97.tar
MultiMC-47bf7fff27665496bc4212bcaccc80350f665f97.tar.gz
MultiMC-47bf7fff27665496bc4212bcaccc80350f665f97.tar.lz
MultiMC-47bf7fff27665496bc4212bcaccc80350f665f97.tar.xz
MultiMC-47bf7fff27665496bc4212bcaccc80350f665f97.zip
Merge remote-tracking branch 'upstream/develop' into updater_tests
Conflicts: mmc_updater/src/tests/CMakeLists.txt
Diffstat (limited to 'logic/net/NetJob.h')
-rw-r--r--logic/net/NetJob.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/logic/net/NetJob.h b/logic/net/NetJob.h
index 6e2e7607..68c4c408 100644
--- a/logic/net/NetJob.h
+++ b/logic/net/NetJob.h
@@ -36,10 +36,16 @@ public:
template <typename T> bool addNetAction(T action)
{
NetActionPtr base = std::static_pointer_cast<NetAction>(action);
- base->index_within_job = downloads.size();
+ base->m_index_within_job = downloads.size();
downloads.append(action);
- parts_progress.append(part_info());
- total_progress++;
+ part_info pi;
+ {
+ pi.current_progress = base->currentProgress();
+ pi.total_progress = base->totalProgress();
+ pi.failures = base->numberOfFailures();
+ }
+ parts_progress.append(pi);
+ total_progress += pi.total_progress;
// if this is already running, the action needs to be started right away!
if (isRunning())
{