diff options
author | TheKodeToad <TheKodeToad@proton.me> | 2023-03-19 21:26:25 +0000 |
---|---|---|
committer | TheKodeToad <TheKodeToad@proton.me> | 2023-03-19 21:26:25 +0000 |
commit | 46f448dfba2a3c4bffe60f373ee27b1d19873c9e (patch) | |
tree | 1eed1794d30924a1191f3a4f499dc73fda7d4361 /launcher/modplatform/modrinth/ModrinthPackExportTask.cpp | |
parent | 710156b9f1b9555cd7e5562c8673074f80457d92 (diff) | |
download | PrismLauncher-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.cpp | 10 |
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; } |