aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheKodeToad <TheKodeToad@proton.me>2023-04-17 13:52:51 +0100
committerTheKodeToad <TheKodeToad@proton.me>2023-04-18 09:28:10 +0100
commit709736d3f9a77206b5b6f809e5e45495f1db1315 (patch)
tree81610156273be1bdcc7776fccbf3e94db2503897
parent2e9403a324bf7a62fd61b4df78d6c9cc13f65d01 (diff)
downloadPrismLauncher-709736d3f9a77206b5b6f809e5e45495f1db1315.tar.gz
PrismLauncher-709736d3f9a77206b5b6f809e5e45495f1db1315.tar.bz2
PrismLauncher-709736d3f9a77206b5b6f809e5e45495f1db1315.zip
Make response const
I don't think the segfault fix was ideal :P Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
-rw-r--r--launcher/modplatform/modrinth/ModrinthPackExportTask.cpp6
-rw-r--r--launcher/modplatform/modrinth/ModrinthPackExportTask.h2
2 files changed, 3 insertions, 5 deletions
diff --git a/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp b/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp
index 6da9d3c1..54932131 100644
--- a/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp
+++ b/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp
@@ -56,9 +56,7 @@ void ModrinthPackExportTask::executeTask()
bool ModrinthPackExportTask::abort()
{
if (task != nullptr) {
- if (!task->abort())
- return false;
-
+ task->abort();
task = nullptr;
emitAborted();
return true;
@@ -158,7 +156,7 @@ void ModrinthPackExportTask::makeApiRequest()
}
}
-void ModrinthPackExportTask::parseApiResponse(QByteArray* response)
+void ModrinthPackExportTask::parseApiResponse(const QByteArray* response)
{
task = nullptr;
diff --git a/launcher/modplatform/modrinth/ModrinthPackExportTask.h b/launcher/modplatform/modrinth/ModrinthPackExportTask.h
index a0b006b9..25045cf2 100644
--- a/launcher/modplatform/modrinth/ModrinthPackExportTask.h
+++ b/launcher/modplatform/modrinth/ModrinthPackExportTask.h
@@ -64,7 +64,7 @@ class ModrinthPackExportTask : public Task {
void collectFiles();
void collectHashes();
void makeApiRequest();
- void parseApiResponse(QByteArray* response);
+ void parseApiResponse(const QByteArray* response);
void buildZip();
QByteArray generateIndex();