aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-06-15 22:59:41 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-06-15 22:59:41 +0300
commit147366bc0a905869f41bd8577337354bc7894e88 (patch)
treefb203e7d531ed4c35ddbc3549afa1f10060c48ab /launcher/modplatform/modrinth/ModrinthPackExportTask.cpp
parent8bf5ba2836f8bb2d0555527947e80ea873515d03 (diff)
downloadPrismLauncher-147366bc0a905869f41bd8577337354bc7894e88.tar.gz
PrismLauncher-147366bc0a905869f41bd8577337354bc7894e88.tar.bz2
PrismLauncher-147366bc0a905869f41bd8577337354bc7894e88.zip
Made ByteSynkArray to use shared_ptr
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher/modplatform/modrinth/ModrinthPackExportTask.cpp')
-rw-r--r--launcher/modplatform/modrinth/ModrinthPackExportTask.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp b/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp
index bff9bf42..c607bb89 100644
--- a/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp
+++ b/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp
@@ -157,7 +157,7 @@ void ModrinthPackExportTask::makeApiRequest()
if (pendingHashes.isEmpty())
buildZip();
else {
- QByteArray* response = new QByteArray;
+ auto response = std::make_shared<QByteArray>();
task = api.currentVersions(pendingHashes.values(), "sha512", response);
connect(task.get(), &NetJob::succeeded, [this, response]() { parseApiResponse(response); });
connect(task.get(), &NetJob::failed, this, &ModrinthPackExportTask::emitFailed);
@@ -165,7 +165,7 @@ void ModrinthPackExportTask::makeApiRequest()
}
}
-void ModrinthPackExportTask::parseApiResponse(const QByteArray* response)
+void ModrinthPackExportTask::parseApiResponse(const std::shared_ptr<QByteArray> response)
{
task = nullptr;