mirror of
https://github.com/UltimMC/Launcher.git
synced 2026-01-01 05:06:15 +00:00
Revert "Merge pull request #9 from MultiMC/develop"
This reverts commitccc86e4e02, reversing changes made to306c655ab5.
This commit is contained in:
@@ -28,14 +28,6 @@ Technic::SingleZipPackInstallTask::SingleZipPackInstallTask(const QUrl &sourceUr
|
||||
m_minecraftVersion = minecraftVersion;
|
||||
}
|
||||
|
||||
bool Technic::SingleZipPackInstallTask::abort() {
|
||||
if(m_abortable)
|
||||
{
|
||||
return m_filesNetJob->abort();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void Technic::SingleZipPackInstallTask::executeTask()
|
||||
{
|
||||
setStatus(tr("Downloading modpack:\n%1").arg(m_sourceUrl.toString()));
|
||||
@@ -55,8 +47,6 @@ void Technic::SingleZipPackInstallTask::executeTask()
|
||||
|
||||
void Technic::SingleZipPackInstallTask::downloadSucceeded()
|
||||
{
|
||||
m_abortable = false;
|
||||
|
||||
setStatus(tr("Extracting modpack"));
|
||||
QDir extractDir(FS::PathCombine(m_stagingPath, ".minecraft"));
|
||||
qDebug() << "Attempting to create instance from" << m_archivePath;
|
||||
@@ -77,14 +67,12 @@ void Technic::SingleZipPackInstallTask::downloadSucceeded()
|
||||
|
||||
void Technic::SingleZipPackInstallTask::downloadFailed(QString reason)
|
||||
{
|
||||
m_abortable = false;
|
||||
emitFailed(reason);
|
||||
m_filesNetJob.reset();
|
||||
}
|
||||
|
||||
void Technic::SingleZipPackInstallTask::downloadProgressChanged(qint64 current, qint64 total)
|
||||
{
|
||||
m_abortable = true;
|
||||
setProgress(current / 2, total);
|
||||
}
|
||||
|
||||
|
||||
@@ -36,9 +36,6 @@ class MULTIMC_LOGIC_EXPORT SingleZipPackInstallTask : public InstanceTask
|
||||
public:
|
||||
SingleZipPackInstallTask(const QUrl &sourceUrl, const QString &minecraftVersion);
|
||||
|
||||
bool canAbort() const override { return true; }
|
||||
bool abort() override;
|
||||
|
||||
protected:
|
||||
void executeTask() override;
|
||||
|
||||
@@ -51,8 +48,6 @@ private slots:
|
||||
void extractAborted();
|
||||
|
||||
private:
|
||||
bool m_abortable = false;
|
||||
|
||||
QUrl m_sourceUrl;
|
||||
QString m_minecraftVersion;
|
||||
QString m_archivePath;
|
||||
|
||||
@@ -27,14 +27,6 @@ Technic::SolderPackInstallTask::SolderPackInstallTask(const QUrl &sourceUrl, con
|
||||
m_minecraftVersion = minecraftVersion;
|
||||
}
|
||||
|
||||
bool Technic::SolderPackInstallTask::abort() {
|
||||
if(m_abortable)
|
||||
{
|
||||
return m_filesNetJob->abort();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void Technic::SolderPackInstallTask::executeTask()
|
||||
{
|
||||
setStatus(tr("Finding recommended version:\n%1").arg(m_sourceUrl.toString()));
|
||||
@@ -114,8 +106,6 @@ void Technic::SolderPackInstallTask::fileListSucceeded()
|
||||
|
||||
void Technic::SolderPackInstallTask::downloadSucceeded()
|
||||
{
|
||||
m_abortable = false;
|
||||
|
||||
setStatus(tr("Extracting modpack"));
|
||||
m_filesNetJob.reset();
|
||||
m_extractFuture = QtConcurrent::run([this]()
|
||||
@@ -142,14 +132,12 @@ void Technic::SolderPackInstallTask::downloadSucceeded()
|
||||
|
||||
void Technic::SolderPackInstallTask::downloadFailed(QString reason)
|
||||
{
|
||||
m_abortable = false;
|
||||
emitFailed(reason);
|
||||
m_filesNetJob.reset();
|
||||
}
|
||||
|
||||
void Technic::SolderPackInstallTask::downloadProgressChanged(qint64 current, qint64 total)
|
||||
{
|
||||
m_abortable = true;
|
||||
setProgress(current / 2, total);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,9 +29,6 @@ namespace Technic
|
||||
public:
|
||||
explicit SolderPackInstallTask(const QUrl &sourceUrl, const QString &minecraftVersion);
|
||||
|
||||
bool canAbort() const override { return true; }
|
||||
bool abort() override;
|
||||
|
||||
protected:
|
||||
//! Entry point for tasks.
|
||||
virtual void executeTask() override;
|
||||
@@ -46,8 +43,6 @@ namespace Technic
|
||||
void extractAborted();
|
||||
|
||||
private:
|
||||
bool m_abortable = false;
|
||||
|
||||
NetJobPtr m_filesNetJob;
|
||||
QUrl m_sourceUrl;
|
||||
QString m_minecraftVersion;
|
||||
|
||||
Reference in New Issue
Block a user