diff options
author | Trial97 <alexandru.tripon97@gmail.com> | 2023-06-18 23:27:26 +0300 |
---|---|---|
committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-06-18 23:27:26 +0300 |
commit | 0161520b332f485483f57acc305ad71a00d63fbc (patch) | |
tree | 802de21c9e5a261982ae78a988d11a4887dca983 /launcher/modplatform/modrinth/ModrinthCheckUpdate.cpp | |
parent | 147366bc0a905869f41bd8577337354bc7894e88 (diff) | |
download | PrismLauncher-0161520b332f485483f57acc305ad71a00d63fbc.tar.gz PrismLauncher-0161520b332f485483f57acc305ad71a00d63fbc.tar.bz2 PrismLauncher-0161520b332f485483f57acc305ad71a00d63fbc.zip |
Fixed leaks
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher/modplatform/modrinth/ModrinthCheckUpdate.cpp')
-rw-r--r-- | launcher/modplatform/modrinth/ModrinthCheckUpdate.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/launcher/modplatform/modrinth/ModrinthCheckUpdate.cpp b/launcher/modplatform/modrinth/ModrinthCheckUpdate.cpp index 6a3f12f9..36002bad 100644 --- a/launcher/modplatform/modrinth/ModrinthCheckUpdate.cpp +++ b/launcher/modplatform/modrinth/ModrinthCheckUpdate.cpp @@ -53,12 +53,11 @@ void ModrinthCheckUpdate::executeTask() // (though it will rarely happen, if at all) if (mod->metadata()->hash_format != best_hash_type) { auto hash_task = Hashing::createModrinthHasher(mod->fileinfo().absoluteFilePath()); - connect(hash_task.get(), &Task::succeeded, [&] { - QString hash(hash_task->getResult()); + connect(hash_task.get(), &Hashing::Hasher::getResults, [&hashes, &mappings, mod](QString hash) { hashes.append(hash); mappings.insert(hash, mod); }); - connect(hash_task.get(), &Task::failed, [this, hash_task] { failed("Failed to generate hash"); }); + connect(hash_task.get(), &Task::failed, [this] { failed("Failed to generate hash"); }); hashing_task.addTask(hash_task); } else { hashes.append(hash); |