refactor: move mod tasks to their own subfolder

Makes the launcher/minecraft/mod/ folder a little more organized.
This commit is contained in:
flow 2022-04-15 20:35:17 -03:00 committed by flow
parent fcfb2cfc3d
commit 5a34e8fd7c
No known key found for this signature in database
GPG Key ID: 8D0F221F0A59F469
11 changed files with 34 additions and 27 deletions

View File

@ -327,16 +327,16 @@ set(MINECRAFT_SOURCES
minecraft/mod/ModDetails.h
minecraft/mod/ModFolderModel.h
minecraft/mod/ModFolderModel.cpp
minecraft/mod/ModFolderLoadTask.h
minecraft/mod/ModFolderLoadTask.cpp
minecraft/mod/LocalModParseTask.h
minecraft/mod/LocalModParseTask.cpp
minecraft/mod/LocalModUpdateTask.h
minecraft/mod/LocalModUpdateTask.cpp
minecraft/mod/ResourcePackFolderModel.h
minecraft/mod/ResourcePackFolderModel.cpp
minecraft/mod/TexturePackFolderModel.h
minecraft/mod/TexturePackFolderModel.cpp
minecraft/mod/tasks/ModFolderLoadTask.h
minecraft/mod/tasks/ModFolderLoadTask.cpp
minecraft/mod/tasks/LocalModParseTask.h
minecraft/mod/tasks/LocalModParseTask.cpp
minecraft/mod/tasks/LocalModUpdateTask.h
minecraft/mod/tasks/LocalModUpdateTask.cpp
# Assets
minecraft/AssetsUtils.h

View File

@ -1,6 +1,7 @@
#include "ModDownloadTask.h"
#include "Application.h"
#include "minecraft/mod/LocalModUpdateTask.h"
#include "minecraft/mod/tasks/LocalModUpdateTask.h"
ModDownloadTask::ModDownloadTask(ModPlatform::IndexedPack mod, ModPlatform::IndexedVersion version, const std::shared_ptr<ModFolderModel> mods)
: m_mod(mod), m_mod_version(version), mods(mods)

View File

@ -1,12 +1,13 @@
#pragma once
#include "QObjectPtr.h"
#include "minecraft/mod/LocalModUpdateTask.h"
#include "modplatform/ModIndex.h"
#include "tasks/SequentialTask.h"
#include "minecraft/mod/ModFolderModel.h"
#include "net/NetJob.h"
#include <QUrl>
#include "QObjectPtr.h"
#include "minecraft/mod/ModFolderModel.h"
#include "modplatform/ModIndex.h"
#include "net/NetJob.h"
#include "tasks/SequentialTask.h"
#include "minecraft/mod/tasks/LocalModUpdateTask.h"
class ModDownloadTask : public SequentialTask {
Q_OBJECT

View File

@ -14,17 +14,19 @@
*/
#include "ModFolderModel.h"
#include <FileSystem.h>
#include <QDebug>
#include <QFileSystemWatcher>
#include <QMimeData>
#include <QString>
#include <QThreadPool>
#include <QUrl>
#include <QUuid>
#include <QString>
#include <QFileSystemWatcher>
#include <QDebug>
#include "ModFolderLoadTask.h"
#include <QThreadPool>
#include <algorithm>
#include "LocalModParseTask.h"
#include "minecraft/mod/tasks/LocalModParseTask.h"
#include "minecraft/mod/tasks/ModFolderLoadTask.h"
ModFolderModel::ModFolderModel(const QString &dir) : QAbstractListModel(), m_dir(dir)
{

View File

@ -24,8 +24,8 @@
#include "Mod.h"
#include "ModFolderLoadTask.h"
#include "LocalModParseTask.h"
#include "minecraft/mod/tasks/ModFolderLoadTask.h"
#include "minecraft/mod/tasks/LocalModParseTask.h"
class LegacyInstance;
class BaseInstance;

View File

@ -1,9 +1,11 @@
#pragma once
#include <QRunnable>
#include <QDebug>
#include <QObject>
#include "Mod.h"
#include "ModDetails.h"
#include <QRunnable>
#include "minecraft/mod/Mod.h"
#include "minecraft/mod/ModDetails.h"
class LocalModParseTask : public QObject, public QRunnable
{

View File

@ -1,10 +1,11 @@
#pragma once
#include <QRunnable>
#include <QObject>
#include <QDir>
#include <QMap>
#include "Mod.h"
#include <QObject>
#include <QRunnable>
#include <memory>
#include "minecraft/mod/Mod.h"
class ModFolderLoadTask : public QObject, public QRunnable
{