From 0a7383a4e1c36b0dbbdc615433a30665d1777f64 Mon Sep 17 00:00:00 2001 From: flow Date: Thu, 20 Oct 2022 16:54:39 -0300 Subject: [PATCH 1/2] fix: hide ProgressDialog when failing/succeeding tasks WHY IS QT LIKE THAT AAAAAAAA Signed-off-by: flow --- launcher/ui/dialogs/ProgressDialog.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/launcher/ui/dialogs/ProgressDialog.cpp b/launcher/ui/dialogs/ProgressDialog.cpp index 68dd4d17..05269f62 100644 --- a/launcher/ui/dialogs/ProgressDialog.cpp +++ b/launcher/ui/dialogs/ProgressDialog.cpp @@ -136,11 +136,13 @@ void ProgressDialog::onTaskStarted() {} void ProgressDialog::onTaskFailed(QString failure) { reject(); + hide(); } void ProgressDialog::onTaskSucceeded() { accept(); + hide(); } void ProgressDialog::changeStatus(const QString& status) From 01b90809e8be2bef02644ba91feceb21b6f7cb8f Mon Sep 17 00:00:00 2001 From: flow Date: Thu, 20 Oct 2022 16:55:22 -0300 Subject: [PATCH 2/2] fix: memory leak when finishing blocked mods job Signed-off-by: flow --- launcher/modplatform/flame/FileResolvingTask.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/launcher/modplatform/flame/FileResolvingTask.cpp b/launcher/modplatform/flame/FileResolvingTask.cpp index 1e7f5559..0b2431f7 100644 --- a/launcher/modplatform/flame/FileResolvingTask.cpp +++ b/launcher/modplatform/flame/FileResolvingTask.cpp @@ -66,7 +66,11 @@ void Flame::FileResolvingTask::netJobFinished() } index++; } - connect(job, &NetJob::finished, this, &Flame::FileResolvingTask::modrinthCheckFinished); + connect(job, &NetJob::finished, this, + [this, &job] { + modrinthCheckFinished(); + job->deleteLater(); + }); job->start(); }