aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/MinecraftUpdate.cpp
diff options
context:
space:
mode:
authorRachel Powers <508861+Ryex@users.noreply.github.com>2023-03-30 23:50:29 -0700
committerRachel Powers <508861+Ryex@users.noreply.github.com>2023-05-01 10:47:20 -0700
commit9d2f0e4dc8fc3995052770c6a7948cb0372fdcbb (patch)
tree4daee3300ac1b7ad650e715395434d5277027bdf /launcher/minecraft/MinecraftUpdate.cpp
parentf997529cd4fb077b06d05da9c6ff0c23b85b4ebb (diff)
downloadPrismLauncher-9d2f0e4dc8fc3995052770c6a7948cb0372fdcbb.tar.gz
PrismLauncher-9d2f0e4dc8fc3995052770c6a7948cb0372fdcbb.tar.bz2
PrismLauncher-9d2f0e4dc8fc3995052770c6a7948cb0372fdcbb.zip
feat: Propogated subtask progress
Oh boy this is big. > TaskStepProgress struct is now QMetaObject compatabile and can be sent through signals > Task now has a method to propogates sub task progress it must be signal bound by each task containing a task wishing to report progress of it's children. > Downloads report speed > Tasks now have UUIDS to track them - use when reporting - use when logging - use when storeing them or objects related to them Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/minecraft/MinecraftUpdate.cpp')
-rw-r--r--launcher/minecraft/MinecraftUpdate.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/launcher/minecraft/MinecraftUpdate.cpp b/launcher/minecraft/MinecraftUpdate.cpp
index 07ad4882..3ce808f8 100644
--- a/launcher/minecraft/MinecraftUpdate.cpp
+++ b/launcher/minecraft/MinecraftUpdate.cpp
@@ -100,6 +100,7 @@ void MinecraftUpdate::next()
disconnect(task.get(), &Task::failed, this, &MinecraftUpdate::subtaskFailed);
disconnect(task.get(), &Task::aborted, this, &Task::abort);
disconnect(task.get(), &Task::progress, this, &MinecraftUpdate::progress);
+ disconnect(task.get(), &Task::stepProgress, this, &MinecraftUpdate::propogateStepProgress);
disconnect(task.get(), &Task::status, this, &MinecraftUpdate::setStatus);
}
if(m_currentTask == m_tasks.size())
@@ -118,6 +119,7 @@ void MinecraftUpdate::next()
connect(task.get(), &Task::failed, this, &MinecraftUpdate::subtaskFailed);
connect(task.get(), &Task::aborted, this, &Task::abort);
connect(task.get(), &Task::progress, this, &MinecraftUpdate::progress);
+ connect(task.get(), &Task::stepProgress, this, &MinecraftUpdate::propogateStepProgress);
connect(task.get(), &Task::status, this, &MinecraftUpdate::setStatus);
// if the task is already running, do not start it again
if(!task->isRunning())