Merge branch 'develop' into recommended-memory
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
@@ -47,7 +47,7 @@ FlamePackExportTask::FlamePackExportTask(const QString& name,
|
||||
bool optionalFiles,
|
||||
InstancePtr instance,
|
||||
const QString& output,
|
||||
MMCZip::FilterFunction filter,
|
||||
MMCZip::FilterFileFunction filter,
|
||||
int recommendedRAM)
|
||||
: name(name)
|
||||
, version(version)
|
||||
@@ -72,7 +72,6 @@ bool FlamePackExportTask::abort()
|
||||
{
|
||||
if (task) {
|
||||
task->abort();
|
||||
emitAborted();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -173,6 +172,7 @@ void FlamePackExportTask::collectHashes()
|
||||
progressStep->status = status;
|
||||
stepProgress(*progressStep);
|
||||
});
|
||||
connect(hashingTask.get(), &Task::aborted, this, &FlamePackExportTask::emitAborted);
|
||||
hashingTask->start();
|
||||
}
|
||||
|
||||
@@ -248,6 +248,7 @@ void FlamePackExportTask::makeApiRequest()
|
||||
getProjectsInfo();
|
||||
});
|
||||
connect(task.get(), &Task::failed, this, &FlamePackExportTask::getProjectsInfo);
|
||||
connect(task.get(), &Task::aborted, this, &FlamePackExportTask::emitAborted);
|
||||
task->start();
|
||||
}
|
||||
|
||||
@@ -326,6 +327,7 @@ void FlamePackExportTask::getProjectsInfo()
|
||||
buildZip();
|
||||
});
|
||||
connect(projTask.get(), &Task::failed, this, &FlamePackExportTask::emitFailed);
|
||||
connect(task.get(), &Task::aborted, this, &FlamePackExportTask::emitAborted);
|
||||
task.reset(projTask);
|
||||
task->start();
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ class FlamePackExportTask : public Task {
|
||||
bool optionalFiles,
|
||||
InstancePtr instance,
|
||||
const QString& output,
|
||||
MMCZip::FilterFunction filter,
|
||||
MMCZip::FilterFileFunction filter,
|
||||
int recommendedRAM);
|
||||
|
||||
protected:
|
||||
@@ -52,7 +52,7 @@ class FlamePackExportTask : public Task {
|
||||
MinecraftInstance* mcInstance;
|
||||
const QDir gameRoot;
|
||||
const QString output;
|
||||
const MMCZip::FilterFunction filter;
|
||||
const MMCZip::FilterFileFunction filter;
|
||||
const int m_recommendedRAM;
|
||||
|
||||
struct ResolvedFile {
|
||||
|
||||
@@ -40,7 +40,7 @@ ModrinthPackExportTask::ModrinthPackExportTask(const QString& name,
|
||||
bool optionalFiles,
|
||||
InstancePtr instance,
|
||||
const QString& output,
|
||||
MMCZip::FilterFunction filter)
|
||||
MMCZip::FilterFileFunction filter)
|
||||
: name(name)
|
||||
, version(version)
|
||||
, summary(summary)
|
||||
@@ -63,7 +63,6 @@ bool ModrinthPackExportTask::abort()
|
||||
{
|
||||
if (task) {
|
||||
task->abort();
|
||||
emitAborted();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -158,6 +157,7 @@ void ModrinthPackExportTask::makeApiRequest()
|
||||
task = api.currentVersions(pendingHashes.values(), "sha512", response);
|
||||
connect(task.get(), &Task::succeeded, [this, response]() { parseApiResponse(response); });
|
||||
connect(task.get(), &Task::failed, this, &ModrinthPackExportTask::emitFailed);
|
||||
connect(task.get(), &Task::aborted, this, &ModrinthPackExportTask::emitAborted);
|
||||
task->start();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ class ModrinthPackExportTask : public Task {
|
||||
bool optionalFiles,
|
||||
InstancePtr instance,
|
||||
const QString& output,
|
||||
MMCZip::FilterFunction filter);
|
||||
MMCZip::FilterFileFunction filter);
|
||||
|
||||
protected:
|
||||
void executeTask() override;
|
||||
@@ -58,7 +58,7 @@ class ModrinthPackExportTask : public Task {
|
||||
MinecraftInstance* mcInstance;
|
||||
const QDir gameRoot;
|
||||
const QString output;
|
||||
const MMCZip::FilterFunction filter;
|
||||
const MMCZip::FilterFileFunction filter;
|
||||
|
||||
ModrinthAPI api;
|
||||
QFileInfoList files;
|
||||
|
||||
Reference in New Issue
Block a user