Improve invokeMethod syntax
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
parent
710156b9f1
commit
46f448dfba
@ -152,8 +152,7 @@ void ModrinthPackExportTask::buildZip()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (pendingAbort) {
|
if (pendingAbort) {
|
||||||
QMetaObject::invokeMethod(
|
QMetaObject::invokeMethod(this, &ModrinthPackExportTask::emitAborted, Qt::QueuedConnection);
|
||||||
this, [this]() { emitAborted(); }, Qt::QueuedConnection);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,8 +170,7 @@ void ModrinthPackExportTask::buildZip()
|
|||||||
for (const QFileInfo& file : files) {
|
for (const QFileInfo& file : files) {
|
||||||
if (pendingAbort) {
|
if (pendingAbort) {
|
||||||
QFile::remove(output);
|
QFile::remove(output);
|
||||||
QMetaObject::invokeMethod(
|
QMetaObject::invokeMethod(this, &ModrinthPackExportTask::emitAborted, Qt::QueuedConnection);
|
||||||
this, [this]() { emitAborted(); }, Qt::QueuedConnection);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -192,8 +190,7 @@ void ModrinthPackExportTask::buildZip()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QMetaObject::invokeMethod(
|
QMetaObject::invokeMethod(this, &ModrinthPackExportTask::emitSucceeded, Qt::QueuedConnection);
|
||||||
this, [this]() { emitSucceeded(); }, Qt::QueuedConnection);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,6 +223,7 @@ QByteArray ModrinthPackExportTask::generateIndex()
|
|||||||
dependencies["fabric-loader"] = fabric->m_version;
|
dependencies["fabric-loader"] = fabric->m_version;
|
||||||
if (forge != nullptr)
|
if (forge != nullptr)
|
||||||
dependencies["forge"] = forge->m_version;
|
dependencies["forge"] = forge->m_version;
|
||||||
|
|
||||||
obj["dependencies"] = dependencies;
|
obj["dependencies"] = dependencies;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user