diff options
author | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-03-30 23:50:29 -0700 |
---|---|---|
committer | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-05-01 10:47:20 -0700 |
commit | 9d2f0e4dc8fc3995052770c6a7948cb0372fdcbb (patch) | |
tree | 4daee3300ac1b7ad650e715395434d5277027bdf /launcher/InstanceImportTask.cpp | |
parent | f997529cd4fb077b06d05da9c6ff0c23b85b4ebb (diff) | |
download | PrismLauncher-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/InstanceImportTask.cpp')
-rw-r--r-- | launcher/InstanceImportTask.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/launcher/InstanceImportTask.cpp b/launcher/InstanceImportTask.cpp index 080828a8..c196396d 100644 --- a/launcher/InstanceImportTask.cpp +++ b/launcher/InstanceImportTask.cpp @@ -98,6 +98,7 @@ void InstanceImportTask::executeTask() connect(m_filesNetJob.get(), &NetJob::succeeded, this, &InstanceImportTask::downloadSucceeded); connect(m_filesNetJob.get(), &NetJob::progress, this, &InstanceImportTask::downloadProgressChanged); + connect(m_filesNetJob.get(), &NetJob::stepProgress, this, &InstanceImportTask::propogateStepProgress); connect(m_filesNetJob.get(), &NetJob::failed, this, &InstanceImportTask::downloadFailed); connect(m_filesNetJob.get(), &NetJob::aborted, this, &InstanceImportTask::downloadAborted); @@ -291,6 +292,7 @@ void InstanceImportTask::processFlame() }); connect(inst_creation_task, &Task::failed, this, &InstanceImportTask::emitFailed); connect(inst_creation_task, &Task::progress, this, &InstanceImportTask::setProgress); + connect(inst_creation_task, &Task::stepProgress, this, &InstanceImportTask::propogateStepProgress); connect(inst_creation_task, &Task::status, this, &InstanceImportTask::setStatus); connect(inst_creation_task, &Task::finished, inst_creation_task, &InstanceCreationTask::deleteLater); @@ -382,6 +384,7 @@ void InstanceImportTask::processModrinth() }); connect(inst_creation_task, &Task::failed, this, &InstanceImportTask::emitFailed); connect(inst_creation_task, &Task::progress, this, &InstanceImportTask::setProgress); + connect(inst_creation_task, &Task::stepProgress, this, &InstanceImportTask::propogateStepProgress); connect(inst_creation_task, &Task::status, this, &InstanceImportTask::setStatus); connect(inst_creation_task, &Task::finished, inst_creation_task, &InstanceCreationTask::deleteLater); |