aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/ui/dialogs')
-rw-r--r--launcher/ui/dialogs/ExportInstanceDialog.cpp2
-rw-r--r--launcher/ui/dialogs/ExportInstanceDialog.h4
-rw-r--r--launcher/ui/dialogs/ExportMrPackDialog.cpp9
-rw-r--r--launcher/ui/dialogs/ExportMrPackDialog.h4
4 files changed, 9 insertions, 10 deletions
diff --git a/launcher/ui/dialogs/ExportInstanceDialog.cpp b/launcher/ui/dialogs/ExportInstanceDialog.cpp
index f310a689..ea01c5e2 100644
--- a/launcher/ui/dialogs/ExportInstanceDialog.cpp
+++ b/launcher/ui/dialogs/ExportInstanceDialog.cpp
@@ -57,7 +57,7 @@ ExportInstanceDialog::ExportInstanceDialog(InstancePtr instance, QWidget *parent
ui->setupUi(this);
auto model = new QFileSystemModel(this);
auto root = instance->instanceRoot();
- proxyModel = new PackIgnoreProxy(root, this);
+ proxyModel = new FileIgnoreProxy(root, this);
loadPackIgnore();
proxyModel->setSourceModel(model);
ui->treeView->setModel(proxyModel);
diff --git a/launcher/ui/dialogs/ExportInstanceDialog.h b/launcher/ui/dialogs/ExportInstanceDialog.h
index b1b8f911..d96f4537 100644
--- a/launcher/ui/dialogs/ExportInstanceDialog.h
+++ b/launcher/ui/dialogs/ExportInstanceDialog.h
@@ -18,7 +18,7 @@
#include <QDialog>
#include <QModelIndex>
#include <memory>
-#include "PackIgnoreProxy.h"
+#include "FileIgnoreProxy.h"
class BaseInstance;
typedef std::shared_ptr<BaseInstance> InstancePtr;
@@ -47,7 +47,7 @@ private:
private:
Ui::ExportInstanceDialog *ui;
InstancePtr m_instance;
- PackIgnoreProxy * proxyModel;
+ FileIgnoreProxy * proxyModel;
private slots:
void rowsInserted(QModelIndex parent, int top, int bottom);
diff --git a/launcher/ui/dialogs/ExportMrPackDialog.cpp b/launcher/ui/dialogs/ExportMrPackDialog.cpp
index 13262a7e..1a69cc53 100644
--- a/launcher/ui/dialogs/ExportMrPackDialog.cpp
+++ b/launcher/ui/dialogs/ExportMrPackDialog.cpp
@@ -37,7 +37,7 @@ ExportMrPackDialog::ExportMrPackDialog(InstancePtr instance, QWidget* parent)
auto model = new QFileSystemModel(this);
// use the game root - everything outside cannot be exported
QString root = instance->gameRoot();
- proxy = new PackIgnoreProxy(root, this);
+ proxy = new FileIgnoreProxy(root, this);
proxy->setSourceModel(model);
ui->treeView->setModel(proxy);
ui->treeView->setRootIndex(proxy->mapFromSource(model->index(root)));
@@ -58,16 +58,15 @@ void ExportMrPackDialog::done(int result)
{
if (result == Accepted) {
const QString filename = FS::RemoveInvalidFilenameChars(ui->name->text());
- const QString output =
- QFileDialog::getSaveFileName(this, tr("Export %1").arg(ui->name->text()), FS::PathCombine(QDir::homePath(), filename + ".mrpack"),
- "Modrinth pack (*.mrpack *.zip)", nullptr);
+ const QString output = QFileDialog::getSaveFileName(this, tr("Export %1").arg(ui->name->text()),
+ FS::PathCombine(QDir::homePath(), filename + ".mrpack"),
+ "Modrinth pack (*.mrpack *.zip)", nullptr);
if (output.isEmpty())
return;
ModrinthPackExportTask task(ui->name->text(), ui->version->text(), ui->summary->text(), instance, output,
[this](const QString& path) { return proxy->blockedPaths().covers(path); });
-
ProgressDialog progress(this);
progress.setSkipButton(true, tr("Abort"));
if (progress.execWithTask(&task) != QDialog::Accepted)
diff --git a/launcher/ui/dialogs/ExportMrPackDialog.h b/launcher/ui/dialogs/ExportMrPackDialog.h
index 3ded4887..63e3f016 100644
--- a/launcher/ui/dialogs/ExportMrPackDialog.h
+++ b/launcher/ui/dialogs/ExportMrPackDialog.h
@@ -20,7 +20,7 @@
#include <QDialog>
#include "BaseInstance.h"
-#include "PackIgnoreProxy.h"
+#include "FileIgnoreProxy.h"
namespace Ui {
class ExportMrPackDialog;
@@ -38,5 +38,5 @@ class ExportMrPackDialog : public QDialog {
private:
const InstancePtr instance;
Ui::ExportMrPackDialog* ui;
- PackIgnoreProxy* proxy;
+ FileIgnoreProxy* proxy;
};