diff options
Diffstat (limited to 'backend/OneSixUpdate.h')
-rw-r--r-- | backend/OneSixUpdate.h | 35 |
1 files changed, 3 insertions, 32 deletions
diff --git a/backend/OneSixUpdate.h b/backend/OneSixUpdate.h index 3bab4eca..31aed8ba 100644 --- a/backend/OneSixUpdate.h +++ b/backend/OneSixUpdate.h @@ -16,36 +16,25 @@ #pragma once #include <QObject> - #include <QList> - -#include <QNetworkAccessManager> #include <QUrl> -#include "dlqueue.h" +#include "net/DownloadJob.h" #include "tasks/Task.h" #include "libmmc_config.h" +#include "BaseUpdate.h" class MinecraftVersion; class BaseInstance; -/*! - * The game update task is the task that handles downloading instances' files. - */ -class LIBMULTIMC_EXPORT OneSixUpdate : public Task +class LIBMULTIMC_EXPORT OneSixUpdate : public BaseUpdate { Q_OBJECT public: explicit OneSixUpdate(BaseInstance *inst, QObject *parent = 0); - virtual void executeTask(); -public slots: - virtual void error(const QString &msg); - private slots: - void updateDownloadProgress(qint64 current, qint64 total); - void versionFileStart(); void versionFileFinished(); void versionFileFailed(); @@ -54,25 +43,7 @@ private slots: void jarlibFinished(); void jarlibFailed(); - -signals: - /*! - * \brief Signal emitted when the game update is complete. - */ - void gameUpdateComplete(); - - /*! - * \brief Signal emitted if an error occurrs during the update. - * \param errorMsg An error message to be displayed to the user. - */ - void gameUpdateError(const QString &errorMsg); - private: - BaseInstance *m_inst; - - QString m_subStatusMsg; - - QSharedPointer<QNetworkAccessManager> net_manager {new QNetworkAccessManager()}; JobListPtr legacyDownloadJob; JobListPtr specificVersionDownloadJob; JobListPtr jarlibDownloadJob; |