aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/dialogs/ExportMrPackDialog.cpp
diff options
context:
space:
mode:
authorTheKodeToad <TheKodeToad@proton.me>2023-03-04 19:55:38 +0000
committerTheKodeToad <TheKodeToad@proton.me>2023-03-05 18:25:57 +0000
commit970ec8187c2a6b45b9b1031260c07f4e26fe8827 (patch)
tree093ed19ce965deb4168a535b50b37f17661de588 /launcher/ui/dialogs/ExportMrPackDialog.cpp
parent87384182a19ea852522af1b0d69420a510c0a94b (diff)
downloadPrismLauncher-970ec8187c2a6b45b9b1031260c07f4e26fe8827.tar.gz
PrismLauncher-970ec8187c2a6b45b9b1031260c07f4e26fe8827.tar.bz2
PrismLauncher-970ec8187c2a6b45b9b1031260c07f4e26fe8827.zip
More refactoring
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Diffstat (limited to 'launcher/ui/dialogs/ExportMrPackDialog.cpp')
-rw-r--r--launcher/ui/dialogs/ExportMrPackDialog.cpp9
1 files changed, 4 insertions, 5 deletions
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)