Removed modlist checkbox

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97 2023-06-24 11:12:23 +03:00
parent 377707d3db
commit cd1e8dc8cc
No known key found for this signature in database
GPG Key ID: 55EF5DA53DB36318
4 changed files with 15 additions and 34 deletions

View File

@ -41,7 +41,6 @@ FlamePackExportTask::FlamePackExportTask(const QString& name,
const QString& version,
const QString& author,
const QVariant& projectID,
const bool generateModList,
InstancePtr instance,
const QString& output,
MMCZip::FilterFunction filter)
@ -54,7 +53,6 @@ FlamePackExportTask::FlamePackExportTask(const QString& name,
, gameRoot(instance->gameRoot())
, output(output)
, filter(filter)
, generateModList(generateModList)
{}
void FlamePackExportTask::executeTask()
@ -218,10 +216,6 @@ void FlamePackExportTask::makeApiRequest()
void FlamePackExportTask::getProjectsInfo()
{
if (!generateModList) {
buildZip();
return;
}
setStatus(tr("Find project info from curseforge..."));
QList<QString> addonIds;
for (auto resolved : resolvedFiles) {
@ -319,7 +313,6 @@ void FlamePackExportTask::buildZip()
}
indexFile.write(generateIndex());
if (generateModList) {
QuaZipFile modlist(&zip);
if (!modlist.open(QIODevice::WriteOnly, QuaZipNewInfo("modlist.html"))) {
QFile::remove(output);
@ -335,7 +328,6 @@ void FlamePackExportTask::buildZip()
}
content = "<ul>" + content + "</ul>";
modlist.write(content.toUtf8());
}
size_t progress = 0;
for (const QFileInfo& file : files) {

View File

@ -32,7 +32,6 @@ class FlamePackExportTask : public Task {
const QString& version,
const QString& author,
const QVariant& projectID,
const bool generateModList,
InstancePtr instance,
const QString& output,
MMCZip::FilterFunction filter);
@ -52,7 +51,6 @@ class FlamePackExportTask : public Task {
const QDir gameRoot;
const QString output;
const MMCZip::FilterFunction filter;
const bool generateModList;
typedef std::optional<QString> BuildZipResult;
struct ResolvedFile {

View File

@ -43,7 +43,6 @@ ExportMrPackDialog::ExportMrPackDialog(InstancePtr instance, QWidget* parent, Mo
ui->summary->setText(instance->notes().split(QRegularExpression("\\r?\\n"))[0]);
ui->author->hide();
ui->authorLabel->hide();
ui->gnerateModlist->hide();
} else {
setWindowTitle("Export CurseForge Pack");
ui->version->setText("");
@ -118,8 +117,7 @@ void ExportMrPackDialog::done(int result)
task = new ModrinthPackExportTask(ui->name->text(), ui->version->text(), ui->summary->text(), instance, output,
[this](const QString& path) { return proxy->blockedPaths().covers(path); });
else
task = new FlamePackExportTask(ui->name->text(), ui->version->text(), ui->author->text(), ui->summary->text(),
ui->gnerateModlist->isChecked(), instance, output,
task = new FlamePackExportTask(ui->name->text(), ui->version->text(), ui->author->text(), ui->summary->text(), instance, output,
[this](const QString& path) { return proxy->blockedPaths().covers(path); });
connect(task, &Task::failed,

View File

@ -67,13 +67,6 @@
<item row="4" column="1">
<widget class="QLineEdit" name="author"/>
</item>
<item row="5" column="2">
<widget class="QCheckBox" name="gnerateModlist">
<property name="text">
<string>Generate modlist</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>