diff options
Diffstat (limited to 'api')
24 files changed, 36 insertions, 84 deletions
diff --git a/api/logic/FolderInstanceProvider.cpp b/api/logic/FolderInstanceProvider.cpp index 04d5a66b..cedba408 100644 --- a/api/logic/FolderInstanceProvider.cpp +++ b/api/logic/FolderInstanceProvider.cpp @@ -368,6 +368,8 @@ public: connect(&m_backoffTimer, &QTimer::timeout, this, &FolderInstanceStaging::childSucceded); } + virtual ~FolderInstanceStaging() {}; + protected: virtual void executeTask() override { diff --git a/api/logic/java/JavaCheckerJob.h b/api/logic/java/JavaCheckerJob.h index cac2b638..64ac58a1 100644 --- a/api/logic/java/JavaCheckerJob.h +++ b/api/logic/java/JavaCheckerJob.h @@ -28,6 +28,7 @@ class JavaCheckerJob : public Task Q_OBJECT public: explicit JavaCheckerJob(QString job_name) : Task(), m_job_name(job_name) {}; + virtual ~JavaCheckerJob() {}; bool addJavaCheckerAction(JavaCheckerPtr base) { diff --git a/api/logic/java/JavaInstallList.h b/api/logic/java/JavaInstallList.h index 39f37b80..9ec12f87 100644 --- a/api/logic/java/JavaInstallList.h +++ b/api/logic/java/JavaInstallList.h @@ -68,7 +68,7 @@ class JavaListLoadTask : public Task public: explicit JavaListLoadTask(JavaInstallList *vlist); - ~JavaListLoadTask(); + virtual ~JavaListLoadTask(); void executeTask() override; public slots: diff --git a/api/logic/launch/steps/PostLaunchCommand.h b/api/logic/launch/steps/PostLaunchCommand.h index 36b3b96f..88681cbc 100644 --- a/api/logic/launch/steps/PostLaunchCommand.h +++ b/api/logic/launch/steps/PostLaunchCommand.h @@ -23,6 +23,8 @@ class PostLaunchCommand: public LaunchStep Q_OBJECT public: explicit PostLaunchCommand(LaunchTask *parent); + virtual ~PostLaunchCommand() {}; + virtual void executeTask(); virtual bool abort(); virtual bool canAbort() const diff --git a/api/logic/launch/steps/PreLaunchCommand.h b/api/logic/launch/steps/PreLaunchCommand.h index 880cc076..5c955923 100644 --- a/api/logic/launch/steps/PreLaunchCommand.h +++ b/api/logic/launch/steps/PreLaunchCommand.h @@ -23,6 +23,8 @@ class PreLaunchCommand: public LaunchStep Q_OBJECT public: explicit PreLaunchCommand(LaunchTask *parent); + virtual ~PreLaunchCommand() {}; + virtual void executeTask(); virtual bool abort(); virtual bool canAbort() const diff --git a/api/logic/minecraft/MinecraftLoadAndCheck.h b/api/logic/minecraft/MinecraftLoadAndCheck.h index 00515f2d..91aed674 100644 --- a/api/logic/minecraft/MinecraftLoadAndCheck.h +++ b/api/logic/minecraft/MinecraftLoadAndCheck.h @@ -32,6 +32,7 @@ class MinecraftLoadAndCheck : public Task Q_OBJECT public: explicit MinecraftLoadAndCheck(MinecraftInstance *inst, QObject *parent = 0); + virtual ~MinecraftLoadAndCheck() {}; void executeTask() override; private slots: diff --git a/api/logic/minecraft/MinecraftUpdate.h b/api/logic/minecraft/MinecraftUpdate.h index 78c02049..543b2f64 100644 --- a/api/logic/minecraft/MinecraftUpdate.h +++ b/api/logic/minecraft/MinecraftUpdate.h @@ -32,6 +32,8 @@ class OneSixUpdate : public Task Q_OBJECT public: explicit OneSixUpdate(MinecraftInstance *inst, QObject *parent = 0); + virtual ~OneSixUpdate() {}; + void executeTask() override; bool canAbort() const override; diff --git a/api/logic/minecraft/SkinUpload.h b/api/logic/minecraft/SkinUpload.h index 5b331fa9..c47283b1 100644 --- a/api/logic/minecraft/SkinUpload.h +++ b/api/logic/minecraft/SkinUpload.h @@ -21,7 +21,6 @@ public: // Note this class takes ownership of the file. SkinUpload(QObject *parent, AuthSessionPtr session, QByteArray skin, Model model = STEVE); - virtual ~SkinUpload() {} private: diff --git a/api/logic/minecraft/auth/YggdrasilTask.h b/api/logic/minecraft/auth/YggdrasilTask.h index b165d3e9..b5d6af13 100644 --- a/api/logic/minecraft/auth/YggdrasilTask.h +++ b/api/logic/minecraft/auth/YggdrasilTask.h @@ -34,6 +34,7 @@ class YggdrasilTask : public Task Q_OBJECT public: explicit YggdrasilTask(MojangAccount * account, QObject *parent = 0); + virtual ~YggdrasilTask() {}; /** * assign a session to this task. the session will be filled with required infomration diff --git a/api/logic/minecraft/launch/ClaimAccount.h b/api/logic/minecraft/launch/ClaimAccount.h index de9007d1..c11c2128 100644 --- a/api/logic/minecraft/launch/ClaimAccount.h +++ b/api/logic/minecraft/launch/ClaimAccount.h @@ -23,6 +23,8 @@ class ClaimAccount: public LaunchStep Q_OBJECT public: explicit ClaimAccount(LaunchTask *parent, AuthSessionPtr session); + virtual ~ClaimAccount() {}; + void executeTask() override; void finalize() override; bool canAbort() const override diff --git a/api/logic/minecraft/launch/CreateServerResourcePacksFolder.h b/api/logic/minecraft/launch/CreateServerResourcePacksFolder.h index 92026ecb..1e7b6621 100644 --- a/api/logic/minecraft/launch/CreateServerResourcePacksFolder.h +++ b/api/logic/minecraft/launch/CreateServerResourcePacksFolder.h @@ -25,6 +25,8 @@ class CreateServerResourcePacksFolder: public LaunchStep Q_OBJECT public: explicit CreateServerResourcePacksFolder(LaunchTask *parent); + virtual ~CreateServerResourcePacksFolder() {}; + virtual void executeTask(); virtual bool canAbort() const { diff --git a/api/logic/minecraft/launch/DirectJavaLaunch.h b/api/logic/minecraft/launch/DirectJavaLaunch.h index 19087b50..8d2cc467 100644 --- a/api/logic/minecraft/launch/DirectJavaLaunch.h +++ b/api/logic/minecraft/launch/DirectJavaLaunch.h @@ -24,6 +24,8 @@ class DirectJavaLaunch: public LaunchStep Q_OBJECT public: explicit DirectJavaLaunch(LaunchTask *parent); + virtual ~DirectJavaLaunch() {}; + virtual void executeTask(); virtual bool abort(); virtual void proceed(); diff --git a/api/logic/minecraft/launch/LauncherPartLaunch.h b/api/logic/minecraft/launch/LauncherPartLaunch.h index d384c2d1..6ae85a3f 100644 --- a/api/logic/minecraft/launch/LauncherPartLaunch.h +++ b/api/logic/minecraft/launch/LauncherPartLaunch.h @@ -24,6 +24,8 @@ class LauncherPartLaunch: public LaunchStep Q_OBJECT public: explicit LauncherPartLaunch(LaunchTask *parent); + virtual ~LauncherPartLaunch() {}; + virtual void executeTask(); virtual bool abort(); virtual void proceed(); diff --git a/api/logic/minecraft/legacy/LegacyInstance.cpp b/api/logic/minecraft/legacy/LegacyInstance.cpp index 5338763c..6e6d9ae6 100644 --- a/api/logic/minecraft/legacy/LegacyInstance.cpp +++ b/api/logic/minecraft/legacy/LegacyInstance.cpp @@ -96,86 +96,6 @@ shared_qobject_ptr<Task> LegacyInstance::createUpdateTask(Net::Mode) return nullptr; } -/* -class LegacyJarModTask : public Task -{ - //Q_OBJECT -public: - explicit LegacyJarModTask(std::shared_ptr<LegacyInstance> inst) : Task(nullptr), m_inst(inst) - { - } - virtual void executeTask() - { - if (!m_inst->shouldRebuild()) - { - emitSucceeded(); - return; - } - - // Get the mod list - auto modList = m_inst->getJarMods(); - - QFileInfo runnableJar(m_inst->runnableJar()); - QFileInfo baseJar(m_inst->baseJar()); - bool base_is_custom = m_inst->shouldUseCustomBaseJar(); - - // Nothing to do if there are no jar mods to install, no backup and just the mc jar - if (base_is_custom) - { - // yes, this can happen if the instance only has the runnable jar and not the base jar - // it *could* be assumed that such an instance is vanilla, but that wouldn't be safe - // because that's not something mmc4 guarantees - if (runnableJar.isFile() && !baseJar.exists() && modList.empty()) - { - m_inst->setShouldRebuild(false); - emitSucceeded(); - return; - } - - setStatus(tr("Installing mods: Backing up minecraft.jar ...")); - if (!baseJar.exists() && !QFile::copy(runnableJar.filePath(), baseJar.filePath())) - { - emitFailed("It seems both the active and base jar are gone. A fresh base jar will " - "be used on next run."); - m_inst->setShouldRebuild(true); - m_inst->setShouldUpdate(true); - m_inst->setShouldUseCustomBaseJar(false); - return; - } - } - - if (!baseJar.exists()) - { - emitFailed("The base jar " + baseJar.filePath() + " does not exist"); - return; - } - - if (runnableJar.exists() && !QFile::remove(runnableJar.filePath())) - { - emitFailed("Failed to delete old minecraft.jar"); - return; - } - - setStatus(tr("Installing mods: Opening minecraft.jar ...")); - - QString outputJarPath = runnableJar.filePath(); - QString inputJarPath = baseJar.filePath(); - - if(!MMCZip::createModdedJar(inputJarPath, outputJarPath, modList)) - { - emitFailed(tr("Failed to create the custom Minecraft jar file.")); - return; - } - m_inst->setShouldRebuild(false); - // inst->UpdateVersion(true); - emitSucceeded(); - return; - - } - std::shared_ptr<LegacyInstance> m_inst; -}; -*/ - std::shared_ptr<LegacyModList> LegacyInstance::jarModList() const { if (!jar_mod_list) diff --git a/api/logic/minecraft/update/AssetUpdateTask.cpp b/api/logic/minecraft/update/AssetUpdateTask.cpp index 2ad2b5b2..905c5b3d 100644 --- a/api/logic/minecraft/update/AssetUpdateTask.cpp +++ b/api/logic/minecraft/update/AssetUpdateTask.cpp @@ -9,6 +9,11 @@ AssetUpdateTask::AssetUpdateTask(MinecraftInstance * inst) { m_inst = inst; } + +AssetUpdateTask::~AssetUpdateTask() +{ +} + void AssetUpdateTask::executeTask() { setStatus(tr("Updating assets index...")); diff --git a/api/logic/minecraft/update/AssetUpdateTask.h b/api/logic/minecraft/update/AssetUpdateTask.h index c666faa6..870cede5 100644 --- a/api/logic/minecraft/update/AssetUpdateTask.h +++ b/api/logic/minecraft/update/AssetUpdateTask.h @@ -8,6 +8,8 @@ class AssetUpdateTask : public Task Q_OBJECT public: AssetUpdateTask(MinecraftInstance * inst); + virtual ~AssetUpdateTask(); + void executeTask() override; bool canAbort() const override; diff --git a/api/logic/minecraft/update/FMLLibrariesTask.h b/api/logic/minecraft/update/FMLLibrariesTask.h index 85f45468..f281890d 100644 --- a/api/logic/minecraft/update/FMLLibrariesTask.h +++ b/api/logic/minecraft/update/FMLLibrariesTask.h @@ -10,6 +10,7 @@ class FMLLibrariesTask : public Task Q_OBJECT public: FMLLibrariesTask(MinecraftInstance * inst); + virtual ~FMLLibrariesTask() {}; void executeTask() override; diff --git a/api/logic/minecraft/update/FoldersTask.h b/api/logic/minecraft/update/FoldersTask.h index 6e669b1e..e0781ad8 100644 --- a/api/logic/minecraft/update/FoldersTask.h +++ b/api/logic/minecraft/update/FoldersTask.h @@ -8,6 +8,8 @@ class FoldersTask : public Task Q_OBJECT public: FoldersTask(MinecraftInstance * inst); + virtual ~FoldersTask() {}; + void executeTask() override; private: MinecraftInstance *m_inst; diff --git a/api/logic/minecraft/update/LibrariesTask.h b/api/logic/minecraft/update/LibrariesTask.h index d06a5037..cb9babc3 100644 --- a/api/logic/minecraft/update/LibrariesTask.h +++ b/api/logic/minecraft/update/LibrariesTask.h @@ -8,6 +8,7 @@ class LibrariesTask : public Task Q_OBJECT public: LibrariesTask(MinecraftInstance * inst); + virtual ~LibrariesTask() {}; void executeTask() override; diff --git a/api/logic/modplatform/flame/FileResolvingTask.h b/api/logic/modplatform/flame/FileResolvingTask.h index 00658452..e5ed633e 100644 --- a/api/logic/modplatform/flame/FileResolvingTask.h +++ b/api/logic/modplatform/flame/FileResolvingTask.h @@ -13,6 +13,8 @@ class MULTIMC_LOGIC_EXPORT FileResolvingTask : public Task Q_OBJECT public: explicit FileResolvingTask(Flame::Manifest &toProcess); + virtual ~FileResolvingTask() {}; + const Flame::Manifest &getResults() const { return m_toProcess; diff --git a/api/logic/net/ChecksumValidator.h b/api/logic/net/ChecksumValidator.h index 3cd25bc3..187e4b30 100644 --- a/api/logic/net/ChecksumValidator.h +++ b/api/logic/net/ChecksumValidator.h @@ -24,7 +24,6 @@ public: /* methods */ bool write(QByteArray & data) override { m_checksum.addData(data); - this->data.append(data); return true; } bool abort() override @@ -50,7 +49,6 @@ public: /* methods */ } private: /* data */ - QByteArray data; QCryptographicHash m_checksum; QByteArray m_expected; }; diff --git a/api/logic/net/PasteUpload.h b/api/logic/net/PasteUpload.h index 62d2e766..24f5b0eb 100644 --- a/api/logic/net/PasteUpload.h +++ b/api/logic/net/PasteUpload.h @@ -12,6 +12,7 @@ class MULTIMC_LOGIC_EXPORT PasteUpload : public Task public: PasteUpload(QWidget *window, QString text, QString key = "public"); virtual ~PasteUpload(); + QString pasteLink() { return m_pasteLink; diff --git a/api/logic/tasks/SequentialTask.h b/api/logic/tasks/SequentialTask.h index 69031095..a2f3580f 100644 --- a/api/logic/tasks/SequentialTask.h +++ b/api/logic/tasks/SequentialTask.h @@ -12,6 +12,7 @@ class MULTIMC_LOGIC_EXPORT SequentialTask : public Task Q_OBJECT public: explicit SequentialTask(QObject *parent = 0); + virtual ~SequentialTask() {}; void addTask(std::shared_ptr<Task> task); diff --git a/api/logic/updater/DownloadTask.h b/api/logic/updater/DownloadTask.h index 186826e2..8330d3e8 100644 --- a/api/logic/updater/DownloadTask.h +++ b/api/logic/updater/DownloadTask.h @@ -38,6 +38,7 @@ public: * target is a template - XXXXXX at the end will be replaced with a random generated string, ensuring uniqueness */ explicit DownloadTask(Status status, QString target, QObject* parent = 0); + virtual ~DownloadTask() {}; /// Get the directory that will contain the update files. QString updateFilesDir(); |