aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp
diff options
context:
space:
mode:
authorTheKodeToad <TheKodeToad@proton.me>2023-03-19 21:26:25 +0000
committerTheKodeToad <TheKodeToad@proton.me>2023-03-19 21:26:25 +0000
commit46f448dfba2a3c4bffe60f373ee27b1d19873c9e (patch)
tree1eed1794d30924a1191f3a4f499dc73fda7d4361 /launcher/modplatform/modrinth/ModrinthPackExportTask.cpp
parent710156b9f1b9555cd7e5562c8673074f80457d92 (diff)
downloadPrismLauncher-46f448dfba2a3c4bffe60f373ee27b1d19873c9e.tar.gz
PrismLauncher-46f448dfba2a3c4bffe60f373ee27b1d19873c9e.tar.bz2
PrismLauncher-46f448dfba2a3c4bffe60f373ee27b1d19873c9e.zip
Improve invokeMethod syntax
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Diffstat (limited to 'launcher/modplatform/modrinth/ModrinthPackExportTask.cpp')
-rw-r--r--launcher/modplatform/modrinth/ModrinthPackExportTask.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp b/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp
index f86f1ad1..46bfab6d 100644
--- a/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp
+++ b/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp
@@ -152,8 +152,7 @@ void ModrinthPackExportTask::buildZip()
}
if (pendingAbort) {
- QMetaObject::invokeMethod(
- this, [this]() { emitAborted(); }, Qt::QueuedConnection);
+ QMetaObject::invokeMethod(this, &ModrinthPackExportTask::emitAborted, Qt::QueuedConnection);
return;
}
@@ -171,8 +170,7 @@ void ModrinthPackExportTask::buildZip()
for (const QFileInfo& file : files) {
if (pendingAbort) {
QFile::remove(output);
- QMetaObject::invokeMethod(
- this, [this]() { emitAborted(); }, Qt::QueuedConnection);
+ QMetaObject::invokeMethod(this, &ModrinthPackExportTask::emitAborted, Qt::QueuedConnection);
return;
}
@@ -192,8 +190,7 @@ void ModrinthPackExportTask::buildZip()
return;
}
- QMetaObject::invokeMethod(
- this, [this]() { emitSucceeded(); }, Qt::QueuedConnection);
+ QMetaObject::invokeMethod(this, &ModrinthPackExportTask::emitSucceeded, Qt::QueuedConnection);
});
}
@@ -226,6 +223,7 @@ QByteArray ModrinthPackExportTask::generateIndex()
dependencies["fabric-loader"] = fabric->m_version;
if (forge != nullptr)
dependencies["forge"] = forge->m_version;
+
obj["dependencies"] = dependencies;
}