mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-12-22 03:37:14 +00:00
Get rid of QNAM (now subclassed and less needy). Basic LWJGL download and extraction.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user