aboutsummaryrefslogtreecommitdiff
path: root/launcher/tasks/ConcurrentTask.cpp
diff options
context:
space:
mode:
authorRachel Powers <508861+Ryex@users.noreply.github.com>2023-03-31 19:25:01 -0700
committerRachel Powers <508861+Ryex@users.noreply.github.com>2023-05-01 10:47:50 -0700
commitb6452215c16f6b1ee45fea746f9498767e48d049 (patch)
treef5744431139e973844cb8ca1c6915412772ee6ec /launcher/tasks/ConcurrentTask.cpp
parentf1028fa66d556b024765ba4e21ac76d4510a3e3e (diff)
downloadPrismLauncher-b6452215c16f6b1ee45fea746f9498767e48d049.tar.gz
PrismLauncher-b6452215c16f6b1ee45fea746f9498767e48d049.tar.bz2
PrismLauncher-b6452215c16f6b1ee45fea746f9498767e48d049.zip
feat: add `details` signal to `Task`
feat: add details to mod pack downloading feat: add logging rule sloading form `ligging.ini at data path root feat: add `launcher.task` `launcher.task.net` and `launcher.task.net.[down|up]load` logging categories fix: add new subtask progress to the end of the lay out not the beginning (cuts down on flickering) Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/tasks/ConcurrentTask.cpp')
-rw-r--r--launcher/tasks/ConcurrentTask.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/launcher/tasks/ConcurrentTask.cpp b/launcher/tasks/ConcurrentTask.cpp
index 41c405db..8d4f94ed 100644
--- a/launcher/tasks/ConcurrentTask.cpp
+++ b/launcher/tasks/ConcurrentTask.cpp
@@ -95,6 +95,7 @@ void ConcurrentTask::startNext()
connect(next.get(), &Task::failed, this, [this, next](QString msg) { subTaskFailed(next, msg); });
connect(next.get(), &Task::status, this, [this, next](QString msg){ subTaskStatus(next, msg); });
+ connect(next.get(), &Task::details, this, [this, next](QString msg){ subTaskDetails(next, msg); });
connect(next.get(), &Task::stepProgress, this, [this, next](TaskStepProgressList tp){ subTaskStepProgress(next, tp); });
connect(next.get(), &Task::progress, this, [this, next](qint64 current, qint64 total){ subTaskProgress(next, current, total); });
@@ -151,7 +152,14 @@ void ConcurrentTask::subTaskStatus(Task::Ptr task, const QString& msg)
auto taskProgress = m_task_progress.value(task->getUid());
taskProgress->status = msg;
taskProgress->state = TaskStepState::Running;
- updateState();
+ updateStepProgress();
+}
+
+void ConcurrentTask::subTaskDetails(Task::Ptr task, const QString& msg)
+{
+ auto taskProgress = m_task_progress.value(task->getUid());
+ taskProgress->details = msg;
+ taskProgress->state = TaskStepState::Running;
updateStepProgress();
}
@@ -162,7 +170,6 @@ void ConcurrentTask::subTaskProgress(Task::Ptr task, qint64 current, qint64 tota
taskProgress->current = current;
taskProgress->total = total;
taskProgress->state = TaskStepState::Running;
- taskProgress->details = task->getDetails();
updateStepProgress();
updateState();