summaryrefslogtreecommitdiffstats
path: root/backend/OneSixUpdate.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-08-07 01:38:18 +0200
committerPetr Mrázek <peterix@gmail.com>2013-08-07 01:38:18 +0200
commitafaa1dc223ec87b685778ee0aed81cb6caaa05c7 (patch)
tree4e1e6589d56ba9bc6984547d158d413a0495272f /backend/OneSixUpdate.cpp
parent091b7502cfc1bc01a1abd68a0fb9a0b2693a4658 (diff)
downloadMultiMC-afaa1dc223ec87b685778ee0aed81cb6caaa05c7.tar
MultiMC-afaa1dc223ec87b685778ee0aed81cb6caaa05c7.tar.gz
MultiMC-afaa1dc223ec87b685778ee0aed81cb6caaa05c7.tar.lz
MultiMC-afaa1dc223ec87b685778ee0aed81cb6caaa05c7.tar.xz
MultiMC-afaa1dc223ec87b685778ee0aed81cb6caaa05c7.zip
Get rid of QNAM (now subclassed and less needy). Basic LWJGL download and extraction.
Diffstat (limited to 'backend/OneSixUpdate.cpp')
-rw-r--r--backend/OneSixUpdate.cpp20
1 files changed, 2 insertions, 18 deletions
diff --git a/backend/OneSixUpdate.cpp b/backend/OneSixUpdate.cpp
index db3b9864..84d8dfae 100644
--- a/backend/OneSixUpdate.cpp
+++ b/backend/OneSixUpdate.cpp
@@ -33,11 +33,7 @@
#include "pathutils.h"
-OneSixUpdate::OneSixUpdate(BaseInstance *inst, QObject *parent) :
- Task(parent)
-{
- m_inst = inst;
-}
+OneSixUpdate::OneSixUpdate(BaseInstance *inst, QObject *parent):BaseUpdate(inst, parent){}
void OneSixUpdate::executeTask()
{
@@ -142,7 +138,7 @@ void OneSixUpdate::jarlibStart()
{
QString download_path = lib->downloadPath();
QString storage_path = "libraries/" + lib->storagePath();
- jarlibDownloadJob->add(DownloadJob::create(net_manager, download_path, storage_path));
+ jarlibDownloadJob->add(DownloadJob::create(download_path, storage_path));
}
connect(jarlibDownloadJob.data(), SIGNAL(finished()), SLOT(jarlibFinished()));
connect(jarlibDownloadJob.data(), SIGNAL(failed()), SLOT(jarlibFailed()));
@@ -163,15 +159,3 @@ void OneSixUpdate::jarlibFailed()
emitEnded();
}
-void OneSixUpdate::error(const QString &msg)
-{
- emit gameUpdateError(msg);
-}
-
-void OneSixUpdate::updateDownloadProgress(qint64 current, qint64 total)
-{
- // The progress on the current file is current / total
- float currentDLProgress = (float) current / (float) total;
- setProgress((int)(currentDLProgress * 100)); // convert to percentage
-}
-