aboutsummaryrefslogtreecommitdiff
path: root/launcher
diff options
context:
space:
mode:
Diffstat (limited to 'launcher')
-rw-r--r--launcher/minecraft/mod/MetadataHandler.h55
-rw-r--r--launcher/ui/dialogs/ResourceDownloadDialog.cpp1
-rw-r--r--launcher/ui/pages/modplatform/ResourceModel.cpp3
-rw-r--r--launcher/ui/pages/modplatform/ResourceModel.h2
4 files changed, 35 insertions, 26 deletions
diff --git a/launcher/minecraft/mod/MetadataHandler.h b/launcher/minecraft/mod/MetadataHandler.h
index ea9078e0..39723b49 100644
--- a/launcher/minecraft/mod/MetadataHandler.h
+++ b/launcher/minecraft/mod/MetadataHandler.h
@@ -1,20 +1,20 @@
// SPDX-License-Identifier: GPL-3.0-only
/*
- * PolyMC - Minecraft Launcher
- * Copyright (c) 2022 flowln <flowlnlnln@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, version 3.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
+* PolyMC - Minecraft Launcher
+* Copyright (c) 2022 flowln <flowlnlnln@gmail.com>
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, version 3.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <https://www.gnu.org/licenses/>.
+*/
#pragma once
@@ -42,13 +42,28 @@ class Metadata {
return Packwiz::V1::createModFormat(index_dir, internal_mod, mod_slug);
}
- static void update(QDir& index_dir, ModStruct& mod) { Packwiz::V1::updateModIndex(index_dir, mod); }
+ static void update(QDir& index_dir, ModStruct& mod)
+ {
+ Packwiz::V1::updateModIndex(index_dir, mod);
+ }
- static void remove(QDir& index_dir, QString mod_slug) { Packwiz::V1::deleteModIndex(index_dir, mod_slug); }
+ static void remove(QDir& index_dir, QString mod_slug)
+ {
+ Packwiz::V1::deleteModIndex(index_dir, mod_slug);
+ }
- static void remove(QDir& index_dir, QVariant& mod_id) { Packwiz::V1::deleteModIndex(index_dir, mod_id); }
+ static void remove(QDir& index_dir, QVariant& mod_id)
+ {
+ Packwiz::V1::deleteModIndex(index_dir, mod_id);
+ }
- static auto get(QDir& index_dir, QString mod_slug) -> ModStruct { return Packwiz::V1::getIndexForMod(index_dir, mod_slug); }
+ static auto get(QDir& index_dir, QString mod_slug) -> ModStruct
+ {
+ return Packwiz::V1::getIndexForMod(index_dir, mod_slug);
+ }
- static auto get(QDir& index_dir, QVariant& mod_id) -> ModStruct { return Packwiz::V1::getIndexForMod(index_dir, mod_id); }
+ static auto get(QDir& index_dir, QVariant& mod_id) -> ModStruct
+ {
+ return Packwiz::V1::getIndexForMod(index_dir, mod_id);
+ }
};
diff --git a/launcher/ui/dialogs/ResourceDownloadDialog.cpp b/launcher/ui/dialogs/ResourceDownloadDialog.cpp
index dc1d927e..38c57361 100644
--- a/launcher/ui/dialogs/ResourceDownloadDialog.cpp
+++ b/launcher/ui/dialogs/ResourceDownloadDialog.cpp
@@ -185,7 +185,6 @@ ResourcePage* ResourceDownloadDialog::getSelectedPage()
void ResourceDownloadDialog::addResource(ModPlatform::IndexedPack& pack, ModPlatform::IndexedVersion& ver, bool is_indexed)
{
- qWarning() << "DebugName: " << pack.name;
removeResource(pack, ver);
ver.is_currently_selected = true;
diff --git a/launcher/ui/pages/modplatform/ResourceModel.cpp b/launcher/ui/pages/modplatform/ResourceModel.cpp
index b1e936f8..db7d26f8 100644
--- a/launcher/ui/pages/modplatform/ResourceModel.cpp
+++ b/launcher/ui/pages/modplatform/ResourceModel.cpp
@@ -3,8 +3,6 @@
// SPDX-License-Identifier: GPL-3.0-only
#include "ResourceModel.h"
-#include <QDir>
-#include <QList>
#include <QCryptographicHash>
#include <QIcon>
@@ -16,7 +14,6 @@
#include "BuildConfig.h"
#include "Json.h"
-#include "minecraft/mod/tasks/GetModDependenciesTask.h"
#include "net/Download.h"
#include "net/NetJob.h"
diff --git a/launcher/ui/pages/modplatform/ResourceModel.h b/launcher/ui/pages/modplatform/ResourceModel.h
index c0844589..46a02d6e 100644
--- a/launcher/ui/pages/modplatform/ResourceModel.h
+++ b/launcher/ui/pages/modplatform/ResourceModel.h
@@ -4,14 +4,12 @@
#pragma once
-#include <QDir>
#include <optional>
#include <QAbstractListModel>
#include "QObjectPtr.h"
-#include "modplatform/ModIndex.h"
#include "modplatform/ResourceAPI.h"
#include "tasks/ConcurrentTask.h"