From 32b3ed0a1362a4b0798ad71fac3450fb77cb7e41 Mon Sep 17 00:00:00 2001 From: Thomas Groman Date: Thu, 19 Sep 2019 00:41:48 -0700 Subject: merged from 0.6.7 codebase --- api/logic/minecraft/legacy/LegacyModList.h | 41 +++++++++++++----------------- 1 file changed, 17 insertions(+), 24 deletions(-) (limited to 'api/logic/minecraft/legacy/LegacyModList.h') diff --git a/api/logic/minecraft/legacy/LegacyModList.h b/api/logic/minecraft/legacy/LegacyModList.h index 19b191a7..9a7bea50 100644 --- a/api/logic/minecraft/legacy/LegacyModList.h +++ b/api/logic/minecraft/legacy/LegacyModList.h @@ -1,4 +1,4 @@ -/* Copyright 2013-2018 MultiMC Contributors +/* Copyright 2013-2019 MultiMC Contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,38 +19,31 @@ #include #include -#include "minecraft/Mod.h" - #include "multimc_logic_export.h" -class LegacyInstance; -class BaseInstance; - -/** - * A legacy mod list. - * Backed by a folder. - */ class MULTIMC_LOGIC_EXPORT LegacyModList { public: - LegacyModList(const QString &dir, const QString &list_file = QString()); + using Mod = QFileInfo; + + LegacyModList(const QString &dir, const QString &list_file = QString()); - /// Reloads the mod list and returns true if the list changed. - bool update(); + /// Reloads the mod list and returns true if the list changed. + bool update(); - QDir dir() - { - return m_dir; - } + QDir dir() + { + return m_dir; + } - const QList & allMods() - { - return mods; - } + const QList & allMods() + { + return mods; + } protected: - QDir m_dir; - QString m_list_file; - QList mods; + QDir m_dir; + QString m_list_file; + QList mods; }; -- cgit v1.2.3